summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBharat Mediratta <bharat@menalto.com>2009-03-09 02:07:58 +0000
committerBharat Mediratta <bharat@menalto.com>2009-03-09 02:07:58 +0000
commit445f18fb51a55102a95b6a1ffd388ee06ecd5041 (patch)
tree2efede89eac22f786bc04a766f27ddb59aace468
parent198297e0d465de8d479db93cf17d08b5b5e1016e (diff)
Tweak abs_file() and abs_site() to generate https urls as appropriate.
Fixes ticket #125
-rw-r--r--core/helpers/MY_url.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/helpers/MY_url.php b/core/helpers/MY_url.php
index a9ebbcc9..3415ecb4 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, "http") . $path;
+ return url::base(false, $_SERVER["HTTPS"] == "on" ? "https" : "http") . $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, "http");
+ return url::site($path, $_SERVER["HTTPS"] == "on" ? "https" : "http");
}
/**