|
|
@ -2528,9 +2528,11 @@ function mod_deletebyip($boardName, $post, $global = false) { |
|
|
|
|
|
|
|
@set_time_limit($config['mod']['rebuild_timelimit']); |
|
|
|
|
|
|
|
$boards_to_rebuild = array(); |
|
|
|
$threads_to_rebuild = array(); |
|
|
|
$threads_deleted = array(); |
|
|
|
while ($post = $query->fetch(PDO::FETCH_ASSOC)) { |
|
|
|
$boards_to_rebuild[$post['board']] = true; |
|
|
|
openBoard($post['board']); |
|
|
|
if ($config['autotagging']){ |
|
|
|
$query2 = prepare(sprintf("SELECT * FROM ``posts_%s`` WHERE id = :id", $post['board'])); |
|
|
@ -2576,10 +2578,6 @@ function mod_deletebyip($boardName, $post, $global = false) { |
|
|
|
|
|
|
|
deletePostShadow($post['id'], false, false); |
|
|
|
|
|
|
|
rebuildThemes('post-delete', $board['uri']); |
|
|
|
|
|
|
|
buildIndex(); |
|
|
|
|
|
|
|
if ($post['thread']) |
|
|
|
$threads_to_rebuild[$post['board']][$post['thread']] = true; |
|
|
|
else |
|
|
@ -2592,6 +2590,11 @@ function mod_deletebyip($boardName, $post, $global = false) { |
|
|
|
if ($_dummy && !isset($threads_deleted[$_board][$_thread])) |
|
|
|
buildThread($_thread); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
foreach(array_keys($boards_to_rebuild) as $_board) { |
|
|
|
openBoard($_board); |
|
|
|
rebuildThemes('post-delete', $board['uri']); |
|
|
|
buildIndex(); |
|
|
|
} |
|
|
|
|
|
|
|