From b55efb61ed2d09ddff096552bc4801949217148b Mon Sep 17 00:00:00 2001 From: discomrade Date: Wed, 30 Jun 2021 00:35:33 -0200 Subject: [PATCH] Redirect to thread after deleting child post --- post.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/post.php b/post.php index 2f1d5798..f794d917 100644 --- a/post.php +++ b/post.php @@ -280,7 +280,8 @@ function handle_delete(){ $root = $is_mod ? $config['root'] . $config['file_mod'] . '?/' : $config['root']; if (!isset($_POST['json_response'])) { - header('Location: ' . $root . $board['dir'] . $config['file_index'], true, $config['redirect_http']); + // If only deleting a post in a thread, redirect to the current thread + header('Location: ' . $root . $board['dir'] . ($post['thread'] ? $config['dir']['res'] . sprintf($config['file_page'], $post['thread']) : $config['file_index']), true, $config['redirect_http']); } else { header('Content-Type: text/json'); echo json_encode(array('success' => true));