diff options
author | MaZderMind | 2015-12-28 22:45:27 +0100 |
---|---|---|
committer | MaZderMind | 2015-12-28 22:45:27 +0100 |
commit | fb520d55b0598cd917fe0a4bda0b19225f008831 (patch) | |
tree | f3989113258017de91f8d8a7d55d5f7ed4a9ed40 /lib | |
parent | da3c1d2cca11768f2e3f4edd8087a9b07e6d6698 (diff) | |
parent | de21ef94cc0a529a8c7195994a56bb70772d9e4e (diff) |
Merge branch 'master' of c3voc.de:streaming-website
Diffstat (limited to '')
-rw-r--r-- | lib/helper.php | 8 |
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; |