Redirect to thread after deleting child post
This commit is contained in:
parent
ea1071b994
commit
b55efb61ed
3
post.php
3
post.php
|
@ -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));
|
||||||
|
|
Loading…
Reference in New Issue