Rebuild themes when a post or file is deleted...

Rebuild themes when a post or file is deleted in the moderation panel.
This commit is contained in:
Dan Saunders 2013-08-25 23:50:29 -04:00 committed by Michael Foster
parent bb06593ef5
commit 08bb2894bc

View File

@ -1241,6 +1241,8 @@ function mod_ban_post($board, $delete, $post, $token = false) {
modLog("Deleted post #{$post}"); modLog("Deleted post #{$post}");
// Rebuild board // Rebuild board
buildIndex(); buildIndex();
// Rebuild themes
rebuildThemes('post-delete', $board['uri']);
} }
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']);
@ -1333,7 +1335,8 @@ function mod_delete($board, $post) {
modLog("Deleted post #{$post}"); modLog("Deleted post #{$post}");
// Rebuild board // Rebuild board
buildIndex(); buildIndex();
// Rebuild themes
rebuildThemes('post-delete', $board['uri']);
// Redirect // Redirect
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']);
} }
@ -1354,6 +1357,8 @@ function mod_deletefile($board, $post) {
// Rebuild board // Rebuild board
buildIndex(); buildIndex();
// Rebuild themes
rebuildThemes('post-delete', $board['uri']);
// Redirect // Redirect
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']);
@ -1393,6 +1398,9 @@ function mod_spoiler_image($board, $post) {
// Rebuild board // Rebuild board
buildIndex(); buildIndex();
// Rebuild themes
rebuildThemes('post-delete', $board['uri']);
// Redirect // Redirect
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']);
} }
@ -1442,6 +1450,8 @@ function mod_deletebyip($boardName, $post, $global = false) {
deletePost($post['id'], false, false); deletePost($post['id'], false, false);
rebuildThemes('post-delete', $board['uri']);
if ($post['thread']) if ($post['thread'])
$threads_to_rebuild[$post['board']][$post['thread']] = true; $threads_to_rebuild[$post['board']][$post['thread']] = true;
else else