aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorlaurent.duretz <laurent.duretz@piwigo.org>2007-08-11 11:21:37 +0000
committerlaurent.duretz <laurent.duretz@piwigo.org>2007-08-11 11:21:37 +0000
commit7142203c4e3cf5961b98db2ad702bf4c57cfca1e (patch)
treef0d747de3c3b1ea6a8776c94dec9a00be6b3d7e0
parent18072ce5e6a4a34cccd45919876dea51279ccf42 (diff)
Issue 0000729 : Distant Site on http://members.lycos.co.uk/
git-svn-id: http://piwigo.org/svn/trunk@2077 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r--tools/create_listing_file.php13
1 files changed, 7 insertions, 6 deletions
diff --git a/tools/create_listing_file.php b/tools/create_listing_file.php
index 1a5316aad..12827faf5 100644
--- a/tools/create_listing_file.php
+++ b/tools/create_listing_file.php
@@ -31,7 +31,7 @@
// ****** Gallery configuration ****** //
// Script version
-$conf['version'] = 'Butterfly';
+$conf['version'] = 'branch 1.7';
// URL of main gallery
// Example : http://www.my.domain/my/directory
@@ -699,7 +699,7 @@ function pwg_scan_file($file_full, &$line)
$file_dir = dirname($file_full);
$element['file'] = $file_base;
- $element['path'] = 'http://'.dirname($_SERVER['SERVER_NAME'].$_SERVER['PHP_SELF']).substr($file_dir, 1).'/'.$file_base;
+ $element['path'] = dirname($pwg_conf['this_url']).substr($file_dir, 1).'/'.$file_base;
if (in_array($file_ext, $conf['picture_ext']))
{
@@ -1010,13 +1010,14 @@ function pwg_get_moment()
*/
function pwg_referer_is_me()
{
+ global $pwg_conf;
+
//~ pwg_log('>>>>> pwg_referer_is_me() >>>>>'."\n");
$response = false;
- $server = 'http://'.$_SERVER['SERVER_NAME'].$_SERVER['PHP_SELF'];
$caller = (isset($_SERVER['HTTP_REFERER'])) ? $_SERVER['HTTP_REFERER'] : '';
- if (strcasecmp($server, $caller) == 0) {
+ if (strcasecmp($pwg_conf['this_url'], $caller) == 0) {
$response = true;
}
@@ -1177,10 +1178,10 @@ function pwg_generate_start()
//~ pwg_log('>>>>> pwg_generate_start() >>>>>'."\n");
//~ pwg_log("GENARATE start >>>\n".var_export($_SESSION['scan_list_fold'], true)."\n".var_export($_SESSION['scan_list_file'], true)."\nGENERATE start >>>\n");
- global $g_listing, $conf;
+ global $g_listing, $pwg_conf, $conf;
// Flush line <informations>
- $xml_header_url = 'http://'.dirname($_SERVER['SERVER_NAME'].$_SERVER['PHP_SELF']).'/';
+ $xml_header_url = dirname($pwg_conf['this_url']);
$xml_header_date = date('Y-m-d');
$xml_header_version = htmlentities($conf['version']);