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 --- actions/videolist/edit.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'actions/videolist/edit.php') diff --git a/actions/videolist/edit.php b/actions/videolist/edit.php index 107cdc917..fe614cd5a 100644 --- a/actions/videolist/edit.php +++ b/actions/videolist/edit.php @@ -27,14 +27,14 @@ elgg_load_library('elgg:videolist'); // If new video, get data from video providers if(!$video_guid) { - if (!$input['video_url']) { + + $input['video_url'] = elgg_trigger_plugin_hook('videolist:preprocess', 'url', $input, $input['video_url']); + + if (!$input['video_url']) { register_error(elgg_echo('videolist:error:no_url')); forward(REFERER); } - // get_input (htmlawed) "fixes" URLs by breaking them - $input['video_url'] = str_replace('&', '&', $input['video_url']); - $parsedPlatform = videolist_parse_url($input['video_url']); if (!$parsedPlatform) { -- cgit v1.2.3