blob: 916d9d28045d1417c5c0e494c6b72f5132ad2c4a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
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);
|