Created
July 28, 2021 13:43
-
-
Save goodwoor/9dd8c9c373dac1faed8708c7bb03301a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/app/controllers/backend/block_manager.post.php b/app/controllers/backend/block_manager.post.php | |
index 05c2a2e6d9..1ac68b310c 100644 | |
--- a/app/controllers/backend/block_manager.post.php | |
+++ b/app/controllers/backend/block_manager.post.php | |
@@ -54,6 +54,7 @@ if ($_SERVER['REQUEST_METHOD'] == 'POST') { | |
$result = Block::instance()->update($_REQUEST['block_data']); | |
} elseif ($action === 'delete' && isset($_REQUEST['block_id'])) { | |
$result = Block::instance()->remove($_REQUEST['block_id']); | |
+ $_REQUEST['return_url'] = 'block_manager.blocks'; | |
} | |
} | |
@@ -409,6 +410,10 @@ if ($_SERVER['REQUEST_METHOD'] == 'POST') { | |
fn_set_notification('N', __('notice'), __('text_changes_saved')); | |
+ if ($action === 'delete') { | |
+ $ajax->assign('force_redirection', fn_url($return_url . $suffix)); | |
+ return [CONTROLLER_STATUS_NO_CONTENT]; | |
+ } | |
exit; | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment