summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAaron Parecki <aaron@parecki.com>2016-12-17 16:01:52 -0800
committerAaron Parecki <aaron@parecki.com>2016-12-17 16:01:52 -0800
commit0c78cd2f2bfc137925164eef5a6f4cc84c4c8e8a (patch)
treea6a858e1f35d71cb5fd056a19ff44b3443d14351
parent0a211e0218089ca7cdd792e68bc6af3d31bd2a79 (diff)
missed file
-rw-r--r--lib/helpers.php9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/helpers.php b/lib/helpers.php
index 7876e52..3a71d90 100644
--- a/lib/helpers.php
+++ b/lib/helpers.php
@@ -74,6 +74,15 @@ function get_timezone($lat, $lng) {
return null;
}
+function display_url($url) {
+ $parts = parse_url($url);
+ if($parts['path'] != '' && $parts['path'] != '/') {
+ return preg_replace('/^https?:\/\//','', $url);
+ } else {
+ return $parts['host'];
+ }
+}
+
if(!function_exists('http_build_url')) {
function http_build_url($parsed_url) {
$scheme = isset($parsed_url['scheme']) ? $parsed_url['scheme'] . '://' : '';