mirror of
https://github.com/Pathduck/gallery3.git
synced 2026-05-20 11:29:24 -04:00
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.
This commit is contained in:
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user