summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSavetheinternet <savetheinternet@tinyboard.org>2011-12-05 13:21:49 +1100
committerSavetheinternet <savetheinternet@tinyboard.org>2011-12-05 13:21:49 +1100
commit0df1e4972d574b7b6193053b03423edea90b803a (patch)
treeddf38d23b05abaf5e8e1ef7632820b71d4fa5ff2
parentb57be65c9f7b9ae4d3259bd309a0f18479780d50 (diff)
rebuild thread after rebuilding post
-rw-r--r--inc/functions.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/inc/functions.php b/inc/functions.php
index 3ebd319b..2867b4dc 100644
--- a/inc/functions.php
+++ b/inc/functions.php
@@ -702,7 +702,7 @@
function rebuildPost($id) {
global $board;
- $query = prepare(sprintf("SELECT `body_nomarkup` FROM `posts_%s` WHERE `id` = :id", $board['uri']));
+ $query = prepare(sprintf("SELECT `body_nomarkup`, `thread` FROM `posts_%s` WHERE `id` = :id", $board['uri']));
$query->bindValue(':id', $id, PDO::PARAM_INT);
$query->execute() or error(db_error($query));
@@ -719,6 +719,8 @@
$query->bindValue(':id', $id, PDO::PARAM_INT);
$query->execute() or error(db_error($query));
+ buildThread($post['thread'] ? $post['thread'] : $id);
+
return true;
}