From 1067e68292852f524fceda4c6cf7cd5f7110b234 Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Tue, 17 Nov 2009 13:42:51 -0800 Subject: Redesign the way that we consider page types to create buckets of page types, and a subtype for specifics. Currently the top level bucket collection, item, other Here are the core subtypes so far: collection: album, search, tag item: movie, photo other: login, reset, comment-fragment, comment It's legal to create new page_subtypes whenever you want. Use the appropriate page_type to get the coarse grain behavior that you want. --- modules/gallery/helpers/item.php | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'modules/gallery/helpers/item.php') diff --git a/modules/gallery/helpers/item.php b/modules/gallery/helpers/item.php index b3b6d0bb..8f96c3d9 100644 --- a/modules/gallery/helpers/item.php +++ b/modules/gallery/helpers/item.php @@ -124,11 +124,7 @@ class item_Core { * @return string form */ static function get_delete_form($item) { - if (Input::instance()->get("page_type") == "album") { - $page_type = "album"; - } else { - $page_type = "photo"; - } + $page_type = Input::instance()->get("page_type"); $form = new Forge( "quick/delete/$item->id?page_type=$page_type", "", "post", array("id" => "g-confirm-delete")); $form->hidden("_method")->value("put"); -- cgit v1.2.3