summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBharat Mediratta <bharat@menalto.com>2010-06-18 15:25:33 -0700
committerBharat Mediratta <bharat@menalto.com>2010-06-18 15:25:33 -0700
commitbc70ff498d73e0f38f749ea6cd28484ca1a05f83 (patch)
tree864afe06468cb03fbbb46346374cbe714d4e9dd2
parentec40e03a377a8a5cd74b448135307c77a2b9e0e9 (diff)
Use request::protocol()
-rw-r--r--modules/gallery/helpers/MY_url.php6
1 files changed, 2 insertions, 4 deletions
diff --git a/modules/gallery/helpers/MY_url.php b/modules/gallery/helpers/MY_url.php
index 57ce9623..877c5ada 100644
--- a/modules/gallery/helpers/MY_url.php
+++ b/modules/gallery/helpers/MY_url.php
@@ -70,8 +70,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, (empty($_SERVER['HTTPS']) || $_SERVER['HTTPS'] === 'off') ? 'http' : 'https') . $path;
+ return url::base(false, request::protocol()) . $path;
}
/**
@@ -79,8 +78,7 @@ class url extends url_Core {
* doesn't take a protocol parameter.
*/
static function abs_site($path) {
- return url::site(
- $path, (empty($_SERVER['HTTPS']) || $_SERVER['HTTPS'] === 'off') ? 'http' : 'https');
+ return url::site($path, request::protocol());
}
/**