From f399afdd2e3cc072efaca069b7a874c7801b31f6 Mon Sep 17 00:00:00 2001 From: Steve Clay <steve@mrclay.org> Date: Mon, 9 Apr 2012 17:05:57 -0400 Subject: switched to platform classes. see https://github.com/Elgg/videolist/issues/4 --- actions/videolist/edit.php | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'actions') diff --git a/actions/videolist/edit.php b/actions/videolist/edit.php index be566de7e..1572d88ce 100644 --- a/actions/videolist/edit.php +++ b/actions/videolist/edit.php @@ -32,16 +32,19 @@ if(!$video_guid) { forward(REFERER); } - $parsed_url = videolist_parseurl($input['video_url']); - if(!$parsed_url) { + $parsedPlatform = videolist_parse_url($input['video_url']); + + if (!$parsedPlatform) { register_error(elgg_echo('videolist:error:invalid_url')); forward(REFERER); } - + list ($parsed, $platform) = $parsedPlatform; + /* @var Videolist_PlatformInterface $platform */ + unset($input['title']); unset($input['description']); - $input = array_merge(videolist_get_data($parsed_url), $input); + $input = array_merge($parsed, $platform->getData($parsed), $input); } else { unset($input['video_url']); -- cgit v1.2.3