aboutsummaryrefslogtreecommitdiff
path: root/lib/helper.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/helper.php')
-rw-r--r--lib/helper.php8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/helper.php b/lib/helper.php
index 4cf089f..711ac6a 100644
--- a/lib/helper.php
+++ b/lib/helper.php
@@ -13,7 +13,13 @@ function proto()
function baseurl()
{
if(isset($GLOBALS['CONFIG']['BASEURL']))
- return $GLOBALS['CONFIG']['BASEURL'];
+ {
+ $base = $GLOBALS['CONFIG']['BASEURL'];
+ if(startswith('//', $base))
+ $base = proto().':'.$base;
+
+ return $base;
+ }
$base = ssl() ? 'https://' : 'http://';
$base .= $_SERVER['HTTP_HOST'];