Skip to content

Commit

Permalink
Resolved issue 0000825: create_listing_file.php don't work with port …
Browse files Browse the repository at this point in the history
…server

git-svn-id: http://piwigo.org/svn/trunk@2337 68402e56-0260-453c-a942-63ccdbb3a9ee
  • Loading branch information
rub committed May 14, 2008
1 parent 53ed416 commit 52797d0
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tools/create_listing_file.php
Expand Up @@ -139,7 +139,11 @@
$pwg_conf['scan_action'] = array('clean', 'test', 'generate');

// url of this script
$pwg_conf['this_url'] = 'http://'.$_SERVER['SERVER_NAME'].$_SERVER['PHP_SELF'];
$pwg_conf['this_url'] =
(empty($_SERVER['HTTPS']) ? 'http://' : 'https://')
.str_replace(':'.$_SERVER['SERVER_PORT'], '', $_SERVER['HTTP_HOST'])
.($_SERVER['SERVER_PORT'] != 80 ? ':'.$_SERVER['SERVER_PORT'] : '')
.$_SERVER['PHP_SELF'];

// list of reserved directory names
$pwg_conf['reserved_directory_names'] = array($conf['thumbs'], $conf['high'], $conf['represent'], ".", "..", ".svn");
Expand Down

0 comments on commit 52797d0

Please sign in to comment.