From 09619e09ed4544a0529231bfc8dd81ec719f2810 Mon Sep 17 00:00:00 2001 From: Cash Costello Date: Sat, 28 Mar 2009 03:01:00 +0000 Subject: moved edit and delete to page handler - need to update links --- edit.php | 30 +++++++++++++++++------------- 1 file changed, 17 insertions(+), 13 deletions(-) (limited to 'edit.php') diff --git a/edit.php b/edit.php index 3e597cf05..b84d74724 100644 --- a/edit.php +++ b/edit.php @@ -1,39 +1,43 @@ 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 -- cgit v1.2.3