From 8794fe0149c46038acde37d859bcfb0acdf6c1cd Mon Sep 17 00:00:00 2001 From: ctrlcctrlv Date: Tue, 20 Aug 2013 19:53:11 +0000 Subject: [PATCH] Delete JSON when thread deleted --- inc/functions.php | 1 + 1 file changed, 1 insertion(+) diff --git a/inc/functions.php b/inc/functions.php index ae178a73..02e2a932 100644 --- a/inc/functions.php +++ b/inc/functions.php @@ -959,6 +959,7 @@ function deletePost($id, $error_if_doesnt_exist=true, $rebuild_after=true) { // 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_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->bindValue(':board', $board['uri']);