When deleting a post, return to the thread, not the board index (unless deleting the OP)

This commit is contained in:
Michael Walker 2015-05-10 03:01:55 +01:00
parent 4184fdec6e
commit 649255c9b9

View File

@ -1529,7 +1529,11 @@ function mod_delete($board, $post) {
// Rebuild themes
rebuildThemes('post-delete', $board);
// Redirect
if(isset($_GET['thread'])) {
header('Location: ?/' . sprintf($config['board_path'], $board) . $config['dir']['res'] . str_replace('%d', $_GET['thread'], $config['file_page']), true, $config['redirect_http']);
} else {
header('Location: ?/' . sprintf($config['board_path'], $board) . $config['file_index'], true, $config['redirect_http']);
}
}
function mod_deletefile($board, $post, $file) {