diff options
author | Cash Costello <cash.costello@gmail.com> | 2009-03-28 03:01:00 +0000 |
---|---|---|
committer | Cash Costello <cash.costello@gmail.com> | 2009-03-28 03:01:00 +0000 |
commit | 09619e09ed4544a0529231bfc8dd81ec719f2810 (patch) | |
tree | 3e74b71b9682174770518f3e9b6781911d05b2e5 /edit.php | |
parent | 8275ddfe8ebe821f1062f280696d475940461ba9 (diff) | |
download | elgg-09619e09ed4544a0529231bfc8dd81ec719f2810.tar.gz elgg-09619e09ed4544a0529231bfc8dd81ec719f2810.tar.bz2 |
moved edit and delete to page handler - need to update links
Diffstat (limited to 'edit.php')
-rw-r--r-- | edit.php | 30 |
1 files changed, 17 insertions, 13 deletions
@@ -1,39 +1,43 @@ <?php
/**
- * Tidypics Edit Single Photo Properties
+ * Tidypics Edit for Albums and Single Photos
*
*/
include_once(dirname(dirname(dirname(__FILE__))) . "/engine/start.php");
gatekeeper();
- set_context('photos');
- $file = (int) get_input('file_guid');
+
+ set_context('photos');
+ $guid = (int) get_input('guid');
- if (!$file = get_entity($file))
+ if (!$entity = get_entity($guid))
forward();
- if (!$file->canEdit())
+ if (!$entity->canEdit())
forward();
- $subtype = $file->getSubtype();
+ $subtype = $entity->getSubtype();
if ($subtype == 'album') {
- if($container = $file->container_guid)
- set_page_owner($container);
-
$title = elgg_echo('album:edit');
+
+ if ($container = $entity->container_guid)
+ set_page_owner($container);
+
} else if ($subtype == 'image') {
- if ($container = get_entity($file->container_guid)->container_guid)
- set_page_owner($container);
-
$title = elgg_echo('image:edit');
+
+ if ($container = get_entity($entity->container_guid)->container_guid)
+ set_page_owner($container);
+
} else {
forward();
}
$area2 .= elgg_view_title($title);
- $area2 .= elgg_view('tidypics/forms/edit', array('entity' => $file, 'subtype' => $subtype));
+ $area2 .= elgg_view('tidypics/forms/edit', array('entity' => $entity, 'subtype' => $subtype));
$body = elgg_view_layout('two_column_left_sidebar', $area1, $area2);
+
page_draw($title, $body);
?>
\ No newline at end of file |