Merge branch 'master' of git+ssh://git.sihnon.net/home/git/public/sihnon-php-lib

This commit is contained in:
2011-06-26 18:25:12 +01:00
3 changed files with 18 additions and 5 deletions

View File

@@ -91,7 +91,7 @@ class SihnonFramework_Main {
}
public function absoluteUrl($relative_url) {
$secure = isset($_SERVER['secure']);
$secure = isset($_SERVER['SECURE']) || (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on');
$port = $_SERVER['SERVER_PORT'];
return 'http' . ($secure ? 's' : '') . '://'
. $_SERVER['HTTP_HOST'] . (($port == 80 || ($secure && $port == 443)) ? '' : ':' . $port)