diff options
author | Sem <sembrestels@riseup.net> | 2013-11-09 16:11:25 +0100 |
---|---|---|
committer | Sem <sembrestels@riseup.net> | 2013-11-09 16:11:25 +0100 |
commit | 59448d8a9864573c05477a63a6dda404c455fdb6 (patch) | |
tree | 8222848ea99b84a33b07a3113ff63bb07ab46692 /mod/videolist/pages/videolist/edit.php | |
parent | 4cf4e4d3969ab43978c95f88238547530b01422d (diff) | |
parent | 17d7adcb317d25e37d3091e94b66e3f16de54196 (diff) | |
download | elgg-59448d8a9864573c05477a63a6dda404c455fdb6.tar.gz elgg-59448d8a9864573c05477a63a6dda404c455fdb6.tar.bz2 |
Add 'mod/videolist/' from commit '17d7adcb317d25e37d3091e94b66e3f16de54196'
git-subtree-dir: mod/videolist
git-subtree-mainline: 4cf4e4d3969ab43978c95f88238547530b01422d
git-subtree-split: 17d7adcb317d25e37d3091e94b66e3f16de54196
Diffstat (limited to 'mod/videolist/pages/videolist/edit.php')
-rw-r--r-- | mod/videolist/pages/videolist/edit.php | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/mod/videolist/pages/videolist/edit.php b/mod/videolist/pages/videolist/edit.php new file mode 100644 index 000000000..916d9d280 --- /dev/null +++ b/mod/videolist/pages/videolist/edit.php @@ -0,0 +1,49 @@ +<?php +/** + * Edit a videolist item + * + * @package ElggVideolist + */ + +gatekeeper(); + +$guid = (int) get_input('guid'); +$videolist_item = get_entity($guid); +if (!$videolist_item) { + forward(); +} +if (!$videolist_item->canEdit()) { + forward(); +} + +$title = elgg_echo('videolist:edit'); +$container = get_entity($videolist_item->getContainerGUID()); + +elgg_push_breadcrumb(elgg_echo('videolist'), "videolist/all"); +if(elgg_instanceof($container, 'user')){ + elgg_push_breadcrumb($container->name, "videolist/owner/$container->username/"); +} else { + elgg_push_breadcrumb($container->name, "videolist/group/$container->guid/"); +} +elgg_push_breadcrumb($videolist_item->title, $videolist_item->getURL()); +elgg_push_breadcrumb($title); + +elgg_set_page_owner_guid($container->guid); + +$form_vars = array(); +$body_vars = array('guid' => $guid); + +foreach(array_keys(elgg_get_config('videolist')) as $variable) { + $body_vars[$variable] = $videolist_item->$variable; +} +$body_vars['container_guid'] = $videolist_item->container_guid; + +$content = elgg_view_form('videolist/edit', $form_vars, $body_vars); + +$body = elgg_view_layout('content', array( + 'content' => $content, + 'title' => $title, + 'filter' => '', +)); + +echo elgg_view_page($title, $body); |