|
|
@ -1960,7 +1960,7 @@ function mod_ban_post($board, $delete, $post, $token = false) { |
|
|
|
mod_page(_('New ban'), 'mod/ban_form.html', $args); |
|
|
|
} |
|
|
|
|
|
|
|
function mod_warning_post($board, $post, $token = false) { |
|
|
|
function mod_warning_post($board, $delete, $post, $token = false) { |
|
|
|
global $config, $mod; |
|
|
|
|
|
|
|
if (!openBoard($board)) |
|
|
@ -2002,6 +2002,17 @@ function mod_warning_post($board, $post, $token = false) { |
|
|
|
modLog("Attached a public warning message to post #{$post}: " . utf8tohtml($_POST['message'])); |
|
|
|
buildThread($thread ? $thread : $post); |
|
|
|
buildIndex(); |
|
|
|
} elseif (isset($_POST['delete']) && (int) $_POST['delete']) { |
|
|
|
if (!hasPermission($config['mod']['delete'], $board)) |
|
|
|
error($config['error']['noaccess']); |
|
|
|
|
|
|
|
// Delete post |
|
|
|
deletePost($post); |
|
|
|
modLog("Deleted post #{$post}"); |
|
|
|
// Rebuild board |
|
|
|
buildIndex(); |
|
|
|
// Rebuild themes |
|
|
|
rebuildThemes('post-delete', $board); |
|
|
|
} |
|
|
|
if(isset($_POST['thread'])) { |
|
|
|
// Redirect to thread |
|
|
@ -2018,6 +2029,7 @@ function mod_warning_post($board, $post, $token = false) { |
|
|
|
'post' => $post, |
|
|
|
'board' => $board, |
|
|
|
'boards' => listBoards(), |
|
|
|
'delete' => (bool)$delete, |
|
|
|
'reasons' => $config['warning_reasons'], |
|
|
|
'token' => $security_token |
|
|
|
); |
|
|
|