aboutsummaryrefslogtreecommitdiff
path: root/actions/videolist/edit.php
diff options
context:
space:
mode:
authorSteve Clay <steve@mrclay.org>2012-04-09 17:05:57 -0400
committerSteve Clay <steve@mrclay.org>2012-04-09 17:05:57 -0400
commitf399afdd2e3cc072efaca069b7a874c7801b31f6 (patch)
treea2f5d4fb13f5d2b142953451f37294d4b8981598 /actions/videolist/edit.php
parente80bb29671b7887d5749a9eb147be38e6f0401f4 (diff)
downloadelgg-f399afdd2e3cc072efaca069b7a874c7801b31f6.tar.gz
elgg-f399afdd2e3cc072efaca069b7a874c7801b31f6.tar.bz2
switched to platform classes. see https://github.com/Elgg/videolist/issues/4
Diffstat (limited to 'actions/videolist/edit.php')
-rw-r--r--actions/videolist/edit.php11
1 files changed, 7 insertions, 4 deletions
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']);