1
0
mirror of https://github.com/vichan-devel/vichan.git synced 2024-11-28 17:31:00 +01:00

Fix cache error when board deleted

This commit is contained in:
8chan 2014-05-29 14:41:20 +00:00
parent b078bf6a04
commit dc8d8e5bcd
2 changed files with 4 additions and 2 deletions

View File

@ -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());

View File

@ -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');