summaryrefslogtreecommitdiff
path: root/modules/gallery/controllers
diff options
context:
space:
mode:
authorBharat Mediratta <bharat@menalto.com>2010-07-10 11:59:29 -0700
committerBharat Mediratta <bharat@menalto.com>2010-07-10 12:00:06 -0700
commit7ca201b11819ca5bfbcbe76f43bfe7d706c0f27f (patch)
treec2b157b8e507291bfdf15301cb7547e34b220654 /modules/gallery/controllers
parent307e47c3d01c1bbbe294b8339a2f531a5156eb90 (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/controllers')
-rw-r--r--modules/gallery/controllers/quick.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/modules/gallery/controllers/quick.php b/modules/gallery/controllers/quick.php
index 6cfbbc62..52f15e7d 100644
--- a/modules/gallery/controllers/quick.php
+++ b/modules/gallery/controllers/quick.php
@@ -119,7 +119,9 @@ class Quick_Controller extends Controller {
$item->delete();
message::success($msg);
- if (Input::instance()->get("page_type") == "collection") {
+ $from_id = Input::instance()->get("from_id");
+ if (Input::instance()->get("page_type") == "collection" &&
+ $from_id != $id /* deleted the item we were viewing */) {
print json_encode(array("result" => "success", "reload" => 1));
} else {
print json_encode(array("result" => "success",