diff options
author | Bharat Mediratta <bharat@menalto.com> | 2010-07-10 11:59:29 -0700 |
---|---|---|
committer | Bharat Mediratta <bharat@menalto.com> | 2010-07-10 12:00:06 -0700 |
commit | 7ca201b11819ca5bfbcbe76f43bfe7d706c0f27f (patch) | |
tree | c2b157b8e507291bfdf15301cb7547e34b220654 /modules/gallery/helpers | |
parent | 307e47c3d01c1bbbe294b8339a2f531a5156eb90 (diff) |
Pass along the from_id in item::get_delete_form() and then check to
see if we're deleting the album we're inside in quick::delete. If we
delete the album we're currently viewing, redirect to the parent.
This fixes ticket #1185.
Diffstat (limited to 'modules/gallery/helpers')
-rw-r--r-- | modules/gallery/helpers/item.php | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/modules/gallery/helpers/item.php b/modules/gallery/helpers/item.php index aef68c6e..8fea49cc 100644 --- a/modules/gallery/helpers/item.php +++ b/modules/gallery/helpers/item.php @@ -158,8 +158,10 @@ class item_Core { */ static function get_delete_form($item) { $page_type = Input::instance()->get("page_type"); + $from_id = Input::instance()->get("from_id"); $form = new Forge( - "quick/delete/$item->id?page_type=$page_type", "", "post", array("id" => "g-confirm-delete")); + "quick/delete/$item->id?page_type=$page_type&from_id=$from_id", "", + "post", array("id" => "g-confirm-delete")); $group = $form->group("confirm_delete")->label(t("Confirm Deletion")); $group->submit("")->value(t("Delete")); $form->script("") |