forked from leftypol/leftypol
When deleting a post, return to the thread, not the board index (unless deleting the OP)
This commit is contained in:
parent
4184fdec6e
commit
649255c9b9
1 changed files with 5 additions and 1 deletions
|
@ -1529,8 +1529,12 @@ function mod_delete($board, $post) {
|
||||||
// Rebuild themes
|
// Rebuild themes
|
||||||
rebuildThemes('post-delete', $board);
|
rebuildThemes('post-delete', $board);
|
||||||
// Redirect
|
// 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']);
|
header('Location: ?/' . sprintf($config['board_path'], $board) . $config['file_index'], true, $config['redirect_http']);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function mod_deletefile($board, $post, $file) {
|
function mod_deletefile($board, $post, $file) {
|
||||||
global $config, $mod;
|
global $config, $mod;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue