Redirect to thread after deleting child post

This commit is contained in:
discomrade 2021-06-30 00:35:33 -02:00 committed by towards-a-new-leftypol
parent 436886e4d9
commit 9a8aa66eb7

View File

@ -280,7 +280,8 @@ function handle_delete(){
$root = $is_mod ? $config['root'] . $config['file_mod'] . '?/' : $config['root']; $root = $is_mod ? $config['root'] . $config['file_mod'] . '?/' : $config['root'];
if (!isset($_POST['json_response'])) { 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 { } else {
header('Content-Type: text/json'); header('Content-Type: text/json');
echo json_encode(array('success' => true)); echo json_encode(array('success' => true));