blob: 4e6d0d2ec03c0fa7d6433f2d8851748cea31a0f9 (
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
|
<?php
/**
* Tidypics Edit Single Photo Properties
*
*/
include_once(dirname(dirname(dirname(__FILE__))) . "/engine/start.php");
gatekeeper();
set_context('photos');
$file = (int) get_input('file_guid');
if (!$file = get_entity($file))
forward();
if(!$file->canEdit())
forward();
$subtype = $file->getSubtype();
if($subtype == 'album'){
if($container = $file->container_guid)
set_page_owner($container);
$area2 .= elgg_view_title($title = elgg_echo('album:edit'));
}
elseif($subtype == 'image'){
if($container = get_entity($file->container_guid)->container_guid)
set_page_owner($container);
$area2 .= elgg_view_title($title = elgg_echo('image:edit'));
}
else{
forward();
}
$area2 .= elgg_view("tidypics/forms/edit",array('entity' => $file, 'subtype' => $subtype));
$body = elgg_view_layout('two_column_left_sidebar', $area1, $area2);
page_draw(elgg_echo("edit"), $body);
?>
|