diff options
author | patdenice <patdenice@piwigo.org> | 2008-02-29 13:04:00 +0000 |
---|---|---|
committer | patdenice <patdenice@piwigo.org> | 2008-02-29 13:04:00 +0000 |
commit | 234a64607b54be1003659cdb192d6328c2bf5cf8 (patch) | |
tree | b967033b60af350cc8f3f4194e92ee8432c827af /include/functions_url.inc.php | |
parent | 8f354f008eec540d0055e7b774a64feec93ef561 (diff) |
Resolved bugs:
741 and 793: Added user does not appear in listing.
769: show email address in adviser mode when editing user profil.
800: get_absolute_root_url does not work with https protocol.
git-svn-id: http://piwigo.org/svn/branches/branch-1_7@2228 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'include/functions_url.inc.php')
-rw-r--r-- | include/functions_url.inc.php | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/include/functions_url.inc.php b/include/functions_url.inc.php index 99d30acf5..fb94cb4b4 100644 --- a/include/functions_url.inc.php +++ b/include/functions_url.inc.php @@ -60,7 +60,15 @@ function get_absolute_root_url($with_scheme=true) $url = ''; if ($with_scheme) { - $url .= 'http://'.$_SERVER['HTTP_HOST']; + if (empty($_SERVER['HTTPS'])) + { + $url .= 'http://'; + } + else + { + $url .= 'https://'; + } + $url .= $_SERVER['HTTP_HOST']; if ($_SERVER['SERVER_PORT'] != 80) { $url_port = ':'.$_SERVER['SERVER_PORT']; |