diff options
| author | Savetheinternet <savetheinternet@tinyboard.org> | 2011-05-27 22:41:33 +1000 |
|---|---|---|
| committer | Savetheinternet <savetheinternet@tinyboard.org> | 2011-05-27 22:41:33 +1000 |
| commit | 935304ce14333509e0288a857ffa6eb50e8a9be7 (patch) | |
| tree | 115f24cb3ce8dc3ada03b722a4da7cfece268522 /mod.php | |
| parent | 1191bbbd155a89a92bb9cee3ae5dda2a5d2149d6 (diff) | |
rebuild thread and indexes after public ban message
Diffstat (limited to 'mod.php')
| -rw-r--r-- | mod.php | 13 |
1 files changed, 13 insertions, 0 deletions
@@ -1901,6 +1901,19 @@ $query->bindValue(':body', sprintf($config['mod']['ban_message'], htmlentities($_POST['message']))); $query->execute() or error(db_error($query)); + // Rebuild thread + $query = prepare(sprintf("SELECT `thread` FROM `posts_%s` WHERE `id` = :id", $board['uri'])); + $query->bindValue(':id', $post, PDO::PARAM_INT); + $query->execute() or error(db_error($query)); + $thread = $query->fetch(); + if($thread['thread']) + buildThread($thread['thread']); + else + buildThread($post); + + // Rebuild board + buildIndex(); + // Record the action modLog("Attached a public ban message for post #{$post}: " . $_POST['message']); } |
