summaryrefslogtreecommitdiff
path: root/inc
diff options
context:
space:
mode:
authorSavetheinternet <savetheinternet@tinyboard.org>2011-12-03 15:41:14 +1100
committerSavetheinternet <savetheinternet@tinyboard.org>2011-12-03 15:41:14 +1100
commit79aea393c6bab2665bac8e7cc4ce9ba4db128cea (patch)
tree3ddd8f90be0948009d2ffd0cdef4b80192748f7a /inc
parent95920a6972fe8cae55539280342c120b8653e8e3 (diff)
$rebuild_after switch for deleteFile()
Diffstat (limited to 'inc')
-rw-r--r--inc/functions.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/inc/functions.php b/inc/functions.php
index 3f2a56c6..ba658ce3 100644
--- a/inc/functions.php
+++ b/inc/functions.php
@@ -641,7 +641,7 @@
}
// Remove file from post
- function deleteFile($id, $remove_entirely_if_already=true) {
+ function deleteFile($id, $remove_entirely_if_already=true, $rebuild_after=true) {
global $board, $config;
$query = prepare(sprintf("SELECT `thread`,`thumb`,`file` FROM `posts_%s` WHERE `id` = :id LIMIT 1", $board['uri']));
@@ -676,7 +676,7 @@
$query->bindValue(':id', $id, PDO::PARAM_INT);
$query->execute() or error(db_error($query));
- if($post['thread'])
+ if($post['thread'] && $rebuild_after)
buildThread($post['thread']);
}