summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Save <savetheinternet@tinyboard.org>2012-04-16 20:14:57 +1000
committerMichael Save <savetheinternet@tinyboard.org>2012-04-16 20:14:57 +1000
commit93553303b28d21cd2c55aaffc5a5831b6ccaf5c0 (patch)
tree6119964778e29455a8d2bb0e5c55c262dbedfac3
parentcc614e36b4135d5b8ac000bad8ed450df0e61ffe (diff)
rebuild after sticky, lock, etc.
-rw-r--r--inc/mod/pages.php12
1 files changed, 12 insertions, 0 deletions
diff --git a/inc/mod/pages.php b/inc/mod/pages.php
index 7e6cddfe..31c78528 100644
--- a/inc/mod/pages.php
+++ b/inc/mod/pages.php
@@ -312,6 +312,10 @@ function mod_lock($board, $unlock, $post) {
$query->bindValue(':id', $post);
$query->bindValue(':locked', $unlock ? 0 : 1);
$query->execute() or error(db_error($query));
+ if($query->rowCount()) {
+ buildThread($post);
+ buildIndex();
+ }
header('Location: ?/' . sprintf($config['board_path'], $board) . $config['file_index'], true, $config['redirect_http']);
}
@@ -329,6 +333,10 @@ function mod_sticky($board, $unsticky, $post) {
$query->bindValue(':id', $post);
$query->bindValue(':sticky', $unsticky ? 0 : 1);
$query->execute() or error(db_error($query));
+ if($query->rowCount()) {
+ buildThread($post);
+ buildIndex();
+ }
header('Location: ?/' . sprintf($config['board_path'], $board) . $config['file_index'], true, $config['redirect_http']);
}
@@ -346,6 +354,10 @@ function mod_bumplock($board, $unbumplock, $post) {
$query->bindValue(':id', $post);
$query->bindValue(':bumplock', $unbumplock ? 0 : 1);
$query->execute() or error(db_error($query));
+ if($query->rowCount()) {
+ buildThread($post);
+ buildIndex();
+ }
header('Location: ?/' . sprintf($config['board_path'], $board) . $config['file_index'], true, $config['redirect_http']);
}