diff options
author | Pete Harris <dave@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-03-29 18:43:13 +0000 |
---|---|---|
committer | Pete Harris <dave@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-03-29 18:43:13 +0000 |
commit | 4fa7aaa7e363514dc2def25cceafd8cf4333404c (patch) | |
tree | 0b6e31e52f017e962639860f38fd4ad7c595c1e7 /edit.php | |
parent | dd489f623628930e527e8112142576bb0de24b57 (diff) | |
download | elgg-4fa7aaa7e363514dc2def25cceafd8cf4333404c.tar.gz elgg-4fa7aaa7e363514dc2def25cceafd8cf4333404c.tar.bz2 |
Added a basic edit view for videolist (form action/tokens needs fixing still)
Diffstat (limited to 'edit.php')
-rw-r--r-- | edit.php | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/edit.php b/edit.php new file mode 100644 index 000000000..515793003 --- /dev/null +++ b/edit.php @@ -0,0 +1,43 @@ +<?php +/** +* Elgg Edit Video +*/ + +require_once(dirname(dirname(dirname(__FILE__))) . "/engine/start.php"); + +gatekeeper(); + +$video_file = (int) get_input('file_guid'); +if ($video_file = get_entity($video_file)) { + + // Set the page owner + $page_owner = page_owner_entity(); + if ($page_owner === false || is_null($page_owner)) { + $container_guid = $video_file->container_guid; + if (!empty($container_guid)) + if ($page_owner = get_entity($container_guid)) { + set_page_owner($container_guid->guid); + } + if (empty($page_owner)) { + $page_owner = $_SESSION['user']; + set_page_owner($_SESSION['guid']); + } + } + + if ($video_file->canEdit()) { + // set up breadcrumbs + elgg_push_breadcrumb(elgg_echo('videolist:all'), $CONFIG->wwwroot."mod/videolist/all.php"); + elgg_push_breadcrumb(sprintf(elgg_echo("videolist:user"),$page_owner->name), $CONFIG->wwwroot."pg/videolist/".$page_owner->username); + elgg_push_breadcrumb(sprintf(elgg_echo("videolist:edit"))); + + $area1 = elgg_view('navigation/breadcrumbs'); + $area1 .= elgg_view_title($title = elgg_echo('videolist:edit')); + $area2 = elgg_view("forms/edit",array('entity' => $video_file)); + $body = elgg_view_layout('one_column_with_sidebar', $area1.$area2, $area3); + page_draw(elgg_echo("videolist:edit"), $body); + } +} else { + forward(); +} + +?>
\ No newline at end of file |