mirror of
https://github.com/vichan-devel/vichan.git
synced 2024-11-30 18:24:29 +01:00
rebuild thread and indexes after public ban message
This commit is contained in:
parent
1191bbbd15
commit
935304ce14
13
mod.php
13
mod.php
@ -1901,6 +1901,19 @@
|
|||||||
$query->bindValue(':body', sprintf($config['mod']['ban_message'], htmlentities($_POST['message'])));
|
$query->bindValue(':body', sprintf($config['mod']['ban_message'], htmlentities($_POST['message'])));
|
||||||
$query->execute() or error(db_error($query));
|
$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
|
// Record the action
|
||||||
modLog("Attached a public ban message for post #{$post}: " . $_POST['message']);
|
modLog("Attached a public ban message for post #{$post}: " . $_POST['message']);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user