diff options
author | Tim Almdal <tnalmdal@shaw.ca> | 2009-03-14 01:57:37 +0000 |
---|---|---|
committer | Tim Almdal <tnalmdal@shaw.ca> | 2009-03-14 01:57:37 +0000 |
commit | cb3d39fe62d69022cc90ae52b634e997905c242c (patch) | |
tree | 077a6c4ae4f2befb6c7c536117140ec0390aeb20 | |
parent | 74768e4cea35051b346eb8009e016f71cd02d0bf (diff) |
Invert the check for https vs http.
-rw-r--r-- | core/helpers/MY_url.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/core/helpers/MY_url.php b/core/helpers/MY_url.php index 3415ecb4..00cfd032 100644 --- a/core/helpers/MY_url.php +++ b/core/helpers/MY_url.php @@ -59,7 +59,7 @@ class url extends url_Core { * Just like url::file() except that it returns an absolute URI */ static function abs_file($path) { - return url::base(false, $_SERVER["HTTPS"] == "on" ? "https" : "http") . $path; + return url::base(false, (empty($_SERVER['HTTPS']) OR $_SERVER['HTTPS'] === 'off') ? 'http' : 'https') . $path; } /** @@ -67,7 +67,7 @@ class url extends url_Core { * doesn't take a protocol parameter. */ static function abs_site($path) { - return url::site($path, $_SERVER["HTTPS"] == "on" ? "https" : "http"); + return url::site($path, (empty($_SERVER['HTTPS']) OR $_SERVER['HTTPS'] === 'off') ? 'http' : 'https'); } /** |