1
0
mirror of https://github.com/vichan-devel/vichan.git synced 2024-11-12 01:50:48 +01:00

bans.php: rebuild themes only if bans are deleted

This commit is contained in:
Zankaria 2024-03-22 10:56:23 +01:00
parent 67b88ec78f
commit 3e3fa057d5

View File

@ -9,6 +9,8 @@ class Bans {
$query = prepare('DELETE FROM ``bans`` WHERE `id` = :id');
$query->bindValue(':id', $ban_ids[0], PDO::PARAM_INT);
$query->execute() or error(db_error());
rebuildThemes('bans');
} elseif ($len >= 1) {
// Build the query.
$query = 'DELETE FROM ``bans`` WHERE `id` IN (';
@ -25,6 +27,8 @@ class Bans {
}
$query->execute() or error(db_error());
rebuildThemes('bans');
}
}
@ -172,8 +176,6 @@ class Bans {
self::deleteBans($to_delete_list);
rebuildThemes('bans');
return $found_ban;
}