mirror of
https://github.com/vichan-devel/vichan.git
synced 2024-11-26 00:10:55 +01:00
$rebuild_after switch for deleteFile()
This commit is contained in:
parent
14c1c8c354
commit
a1f7adb3d6
@ -641,7 +641,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Remove file from post
|
// 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;
|
global $board, $config;
|
||||||
|
|
||||||
$query = prepare(sprintf("SELECT `thread`,`thumb`,`file` FROM `posts_%s` WHERE `id` = :id LIMIT 1", $board['uri']));
|
$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->bindValue(':id', $id, PDO::PARAM_INT);
|
||||||
$query->execute() or error(db_error($query));
|
$query->execute() or error(db_error($query));
|
||||||
|
|
||||||
if($post['thread'])
|
if($post['thread'] && $rebuild_after)
|
||||||
buildThread($post['thread']);
|
buildThread($post['thread']);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user