mirror of
https://github.com/Pathduck/gallery3.git
synced 2026-04-20 04:29:40 -04:00
Use request::protocol()
This commit is contained in:
@@ -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());
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user