Browse Source

missed file

pull/64/head
Aaron Parecki 8 years ago
parent
commit
0c78cd2f2b
No known key found for this signature in database GPG Key ID: 276C2817346D6056
1 changed files with 9 additions and 0 deletions
  1. +9
    -0
      lib/helpers.php

+ 9
- 0
lib/helpers.php View File

@ -74,6 +74,15 @@ function get_timezone($lat, $lng) {
return null; 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')) { if(!function_exists('http_build_url')) {
function http_build_url($parsed_url) { function http_build_url($parsed_url) {
$scheme = isset($parsed_url['scheme']) ? $parsed_url['scheme'] . '://' : ''; $scheme = isset($parsed_url['scheme']) ? $parsed_url['scheme'] . '://' : '';

Loading…
Cancel
Save