summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSavetheinternet <savetheinternet@tinyboard.org>2011-12-06 14:44:50 +1100
committerSavetheinternet <savetheinternet@tinyboard.org>2011-12-06 14:44:50 +1100
commite379f6680a94cf89057ad7ffbcc003900caecc7e (patch)
tree6f3acb555bb61aeca431ddd3ba02be1ae980da9f
parent7536a1b619396cca8dc7c70bc7365f44fe76a8af (diff)
...
-rw-r--r--mod.php15
1 files changed, 15 insertions, 0 deletions
diff --git a/mod.php b/mod.php
index f68e1dfc..8423b6d2 100644
--- a/mod.php
+++ b/mod.php
@@ -1451,6 +1451,21 @@
cache::delete('all_boards');
}
+ $query = prepare("SELECT `board`, `post` FROM `cites` WHERE `target_board` = :board");
+ $query->bindValue(':board', $board['uri']);
+ $query->execute() or error(db_error($query));
+ while($cite = $query->fetch()) {
+ if($board['uri'] != $cite['board']) {
+ if(!isset($tmp_board))
+ $tmp_board = $board;
+ openBoard($cite['board']);
+ rebuildPost($cite['post']);
+ }
+ }
+
+ if(!isset($tmp_board))
+ $board = $tmp_board;
+
$query = prepare("DELETE FROM `cites` WHERE `board` = :board OR `target_board` = :board");
$query->bindValue(':board', $board['uri']);
$query->execute() or error(db_error($query));