diff options
| author | Steve Clay <steve@mrclay.org> | 2012-04-09 17:07:29 -0400 | 
|---|---|---|
| committer | Steve Clay <steve@mrclay.org> | 2012-04-09 17:07:29 -0400 | 
| commit | cb27322b1421bd4cb2ce1889c38da5c8666d68f2 (patch) | |
| tree | 1f5ff0d1a6c4e9981f86bc2b989882b85fc8689d | |
| parent | 0577676d63ad90e1328ffd7ffaf7a93f2e73187c (diff) | |
| download | elgg-cb27322b1421bd4cb2ce1889c38da5c8666d68f2.tar.gz elgg-cb27322b1421bd4cb2ce1889c38da5c8666d68f2.tar.bz2 | |
fix for users who paste from Chrome's address bar (sometimes leaves off URL scheme)
| -rw-r--r-- | lib/videolist.php | 4 | 
1 files changed, 4 insertions, 0 deletions
| diff --git a/lib/videolist.php b/lib/videolist.php index 93b27b51c..776ce7093 100644 --- a/lib/videolist.php +++ b/lib/videolist.php @@ -29,6 +29,10 @@ function videolist_get_default_platforms() {   */  function videolist_parse_url($url) {      $parsed = parse_url($url); +    if (empty($parsed['host']) && ! empty($parsed['path']) && $parsed['path'][0] !== '/') { +        // user probably forgot scheme +        $url = 'http://' . $url; +    }      $params['url'] = $url;      $platforms = videolist_get_default_platforms();  	$platforms = elgg_trigger_plugin_hook('videolist:prepare', 'platforms', $params, $platforms); | 
