Fix redirection to https:// links

This commit is contained in:
2011-06-19 00:56:52 +01:00
parent a96b3599c8
commit 5735e0df75

View File

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