diff options
| author | Savetheinternet <savetheinternet@tinyboard.org> | 2011-12-03 15:45:24 +1100 |
|---|---|---|
| committer | Savetheinternet <savetheinternet@tinyboard.org> | 2011-12-03 15:45:24 +1100 |
| commit | c1209385574f97e788ca7a7aba9cc5b15e3dac16 (patch) | |
| tree | 33d71a4bc106c9b3e136a787d7638d0837d43d46 | |
| parent | 79aea393c6bab2665bac8e7cc4ce9ba4db128cea (diff) | |
...
| -rw-r--r-- | inc/functions.php | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/inc/functions.php b/inc/functions.php index ba658ce3..efe5e0b5 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, $rebuild_after=true) { + function deleteFile($id, $remove_entirely_if_already=true) { global $board, $config; $query = prepare(sprintf("SELECT `thread`,`thumb`,`file` FROM `posts_%s` WHERE `id` = :id LIMIT 1", $board['uri'])); @@ -676,12 +676,12 @@ $query->bindValue(':id', $id, PDO::PARAM_INT); $query->execute() or error(db_error($query)); - if($post['thread'] && $rebuild_after) + if($post['thread']) buildThread($post['thread']); } // Delete a post (reply or thread) - function deletePost($id, $error_if_doesnt_exist=true) { + function deletePost($id, $error_if_doesnt_exist=true, $rebuild_after=true) { global $board, $config; // Select post and replies (if thread) in one query @@ -718,7 +718,7 @@ $query->bindValue(':id', $id, PDO::PARAM_INT); $query->execute() or error(db_error($query)); - if(isset($rebuild)) { + if(isset($rebuild) && $rebuild_after) { buildThread($rebuild); } |
