From 73cac44d633c45225cd9f1ee102e56044027d04d Mon Sep 17 00:00:00 2001 From: Dave Tosh Date: Wed, 7 Apr 2010 20:24:20 +0000 Subject: edit videos --- actions/edit.php | 42 ++++++++++++++++++++++++++++++++++++++++++ views/default/forms/edit.php | 4 ++-- 2 files changed, 44 insertions(+), 2 deletions(-) create mode 100644 actions/edit.php diff --git a/actions/edit.php b/actions/edit.php new file mode 100644 index 000000000..6ccc2a320 --- /dev/null +++ b/actions/edit.php @@ -0,0 +1,42 @@ +wwwroot . "pg/videolist/" . $_SESSION['user']->username); + exit; +} + +$result = false; + +$container_guid = $video->container_guid; +$container = get_entity($container_guid); + +if ($video->canEdit()) { + + $video->access_id = $access_id; + $video->title = $title; + + // Save tags + $tags = explode(",", $tags); + $video->tags = $tags; + $result = $video->save(); +} + +if ($result) + system_message(elgg_echo("videolist:editsaved")); +else + register_error(elgg_echo("videolist:editfailed")); + +forward($CONFIG->wwwroot . "pg/videolist/" . $container->username); \ No newline at end of file diff --git a/views/default/forms/edit.php b/views/default/forms/edit.php index 00658bd2b..4114b5ad6 100644 --- a/views/default/forms/edit.php +++ b/views/default/forms/edit.php @@ -8,7 +8,7 @@ $page_owner = page_owner_entity(); $container_guid = $vars['entity']->container_guid; ?> -
+