Delete JSON when thread deleted

This commit is contained in:
ctrlcctrlv 2013-08-20 19:53:11 +00:00
parent 8c081a4ab5
commit 8794fe0149

View File

@ -959,6 +959,7 @@ function deletePost($id, $error_if_doesnt_exist=true, $rebuild_after=true) {
// Delete thread HTML page // Delete thread HTML page
file_unlink($board['dir'] . $config['dir']['res'] . sprintf($config['file_page'], $post['id'])); file_unlink($board['dir'] . $config['dir']['res'] . sprintf($config['file_page'], $post['id']));
file_unlink($board['dir'] . $config['dir']['res'] . sprintf($config['file_page50'], $post['id'])); file_unlink($board['dir'] . $config['dir']['res'] . sprintf($config['file_page50'], $post['id']));
file_unlink($board['dir'] . $config['dir']['res'] . sprintf('%d.json', $post['id']));
$antispam_query = prepare('DELETE FROM ``antispam`` WHERE `board` = :board AND `thread` = :thread'); $antispam_query = prepare('DELETE FROM ``antispam`` WHERE `board` = :board AND `thread` = :thread');
$antispam_query->bindValue(':board', $board['uri']); $antispam_query->bindValue(':board', $board['uri']);