From 6d4ac854d8f0a4480ffe16f2bd2a7861707074ee Mon Sep 17 00:00:00 2001 From: Steve Clay Date: Tue, 10 Apr 2012 09:51:20 -0400 Subject: Move URL preprocessing to hook --- lib/videolist.php | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'lib') diff --git a/lib/videolist.php b/lib/videolist.php index 776ce7093..b86db99cf 100644 --- a/lib/videolist.php +++ b/lib/videolist.php @@ -28,12 +28,9 @@ function videolist_get_default_platforms() { * @return array [parsed, platform] */ 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; + $params = array( + 'url' => $url, + ); $platforms = videolist_get_default_platforms(); $platforms = elgg_trigger_plugin_hook('videolist:prepare', 'platforms', $params, $platforms); foreach ($platforms as $list) { -- cgit v1.2.3