aboutsummaryrefslogtreecommitdiff
path: root/lib/helper.php
diff options
context:
space:
mode:
authorMaZderMind2016-12-10 18:26:10 +0100
committerMaZderMind2016-12-10 18:26:10 +0100
commit51ee8234fa7d8c2fbda0705563ab724746dfe9ce (patch)
treef0da1effc9f55f2f75dc57fe1ba17419d559b45b /lib/helper.php
parente4141027ad16565b95d64ea262e6909a64cd6e1f (diff)
parentf6c0270d40f6730fe1e1820f2866b08792df1db6 (diff)
Merge branch 'feature/27-unwind-global-config'
Diffstat (limited to 'lib/helper.php')
-rw-r--r--lib/helper.php10
1 files changed, 8 insertions, 2 deletions
diff --git a/lib/helper.php b/lib/helper.php
index 4fce91e..df7f329 100644
--- a/lib/helper.php
+++ b/lib/helper.php
@@ -18,14 +18,20 @@ function baseurl()
if(startswith('//', $base))
$base = proto().':'.$base;
- return forceslash(forceslash($base).@$GLOBALS['MANDATOR']);
+ return forceslash($base);
}
$base = ssl() ? 'https://' : 'http://';
$base .= $_SERVER['HTTP_HOST'];
$base .= forceslash(dirname($_SERVER['SCRIPT_NAME']));
- return forceslash(forceslash($base).@$GLOBALS['MANDATOR']);
+ return forceslash($base);
+}
+
+function joinpath($parts)
+{
+ $parts = array_map('forceslash', $parts);
+ return rtrim(implode('', $parts), '/');
}
function forceslash($url)