aboutsummaryrefslogtreecommitdiffstats
path: root/include/functions_url.inc.php
diff options
context:
space:
mode:
authorrub <rub@piwigo.org>2007-08-30 05:30:19 +0000
committerrub <rub@piwigo.org>2007-08-30 05:30:19 +0000
commitfad95e65226c2e8f19f32a23c0e55219e21c782c (patch)
treef786c748ae997a6338ad3dbb4ce39de53b6483b9 /include/functions_url.inc.php
parent61f2646d4ef46469682a1c4715fd22d44c4bd743 (diff)
Resolved 0000738: Double port on url
git-svn-id: http://piwigo.org/svn/branches/branch-1_7@2082 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r--include/functions_url.inc.php8
1 files changed, 6 insertions, 2 deletions
diff --git a/include/functions_url.inc.php b/include/functions_url.inc.php
index 80a6d459e..99d30acf5 100644
--- a/include/functions_url.inc.php
+++ b/include/functions_url.inc.php
@@ -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();