aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorSteve Clay <steve@mrclay.org>2012-04-10 09:51:20 -0400
committerSteve Clay <steve@mrclay.org>2012-04-10 09:51:20 -0400
commit6d4ac854d8f0a4480ffe16f2bd2a7861707074ee (patch)
tree5ef9a631f8acecf694065425edefd5ee78d45d1b /lib
parentcb27322b1421bd4cb2ce1889c38da5c8666d68f2 (diff)
downloadelgg-6d4ac854d8f0a4480ffe16f2bd2a7861707074ee.tar.gz
elgg-6d4ac854d8f0a4480ffe16f2bd2a7861707074ee.tar.bz2
Move URL preprocessing to hook
Diffstat (limited to 'lib')
-rw-r--r--lib/videolist.php9
1 files changed, 3 insertions, 6 deletions
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) {