From dc8d8e5bcdb1e28cd410e8301e2da67edfdfce53 Mon Sep 17 00:00:00 2001 From: 8chan Date: Thu, 29 May 2014 14:41:20 +0000 Subject: [PATCH] Fix cache error when board deleted --- expire.php | 5 +++-- inc/mod/pages.php | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/expire.php b/expire.php index aa1ce130..bcd5c7e8 100644 --- a/expire.php +++ b/expire.php @@ -124,6 +124,7 @@ foreach($delete as $i => $d){ // Delete entire board directory rrmdir($board['uri'] . '/'); + cache::delete('board_' . $board['uri']); if ($d['mod']) { $query = prepare('DELETE FROM ``mods`` WHERE `username` = :id'); @@ -133,7 +134,7 @@ foreach($delete as $i => $d){ } fclose($f); } -apc_delete('all_boards_uri'); -apc_delete('all_boards'); +cache::delete('all_boards_uri'); +cache::delete('all_boards'); rebuildThemes('boards'); $query = query('DELETE FROM board_create WHERE uri NOT IN (SELECT uri FROM boards);') or error(db_error()); diff --git a/inc/mod/pages.php b/inc/mod/pages.php index e7fc8e2c..fc7d98d2 100644 --- a/inc/mod/pages.php +++ b/inc/mod/pages.php @@ -442,6 +442,7 @@ function mod_edit_board($boardName) { if ($config['cache']['enabled']) { cache::delete('board_' . $board['uri']); cache::delete('all_boards'); + cache::delete('all_boards_uri'); } rebuildThemes('boards');