Skip to content

Commit

Permalink
Resolved 0000738: Double port on url
Browse files Browse the repository at this point in the history
Merge branch-1_7 2048:2050 into BSF

git-svn-id: http://piwigo.org/svn/trunk@2083 68402e56-0260-453c-a942-63ccdbb3a9ee
  • Loading branch information
rub committed Aug 30, 2007
1 parent b85685c commit 45fde2c
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions include/functions_url.inc.php
Expand Up @@ -61,9 +61,13 @@ function get_absolute_root_url($with_scheme=true)
if ($with_scheme)
{
$url .= 'http://'.$_SERVER['HTTP_HOST'];
if ($_SERVER['SERVER_PORT']!=80)
if ($_SERVER['SERVER_PORT'] != 80)
{
$url .= ':'.$_SERVER['SERVER_PORT'];
$url_port = ':'.$_SERVER['SERVER_PORT'];
if (strrchr($url, ':') != $url_port)
{
$url .= $url_port;
}
}
}
$url .= cookie_path();
Expand Down

0 comments on commit 45fde2c

Please sign in to comment.