aboutsummaryrefslogtreecommitdiff
path: root/lib/helper.php
diff options
context:
space:
mode:
authorMaZderMind2015-12-28 22:45:27 +0100
committerMaZderMind2015-12-28 22:45:27 +0100
commitfb520d55b0598cd917fe0a4bda0b19225f008831 (patch)
treef3989113258017de91f8d8a7d55d5f7ed4a9ed40 /lib/helper.php
parentda3c1d2cca11768f2e3f4edd8087a9b07e6d6698 (diff)
parentde21ef94cc0a529a8c7195994a56bb70772d9e4e (diff)
Merge branch 'master' of c3voc.de:streaming-website
Diffstat (limited to '')
-rw-r--r--lib/helper.php8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/helper.php b/lib/helper.php
index 6635fb1..c23d211 100644
--- a/lib/helper.php
+++ b/lib/helper.php
@@ -37,6 +37,14 @@ function forceslash($url)
return $url;
}
+function forceproto($url)
+{
+ if(startswith('//', $url))
+ $url = proto().':'.$url;
+
+ return $url;
+}
+
function startswith($needle, $haystack)
{
return substr($haystack, 0, strlen($needle)) == $needle;