1
0
mirror of https://github.com/vichan-devel/vichan.git synced 2024-11-27 17:00:52 +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 = prepare('DELETE FROM ``bans`` WHERE `id` = :id');
$query->bindValue(':id', $ban_ids[0], PDO::PARAM_INT); $query->bindValue(':id', $ban_ids[0], PDO::PARAM_INT);
$query->execute() or error(db_error()); $query->execute() or error(db_error());
rebuildThemes('bans');
} elseif ($len >= 1) { } elseif ($len >= 1) {
// Build the query. // Build the query.
$query = 'DELETE FROM ``bans`` WHERE `id` IN ('; $query = 'DELETE FROM ``bans`` WHERE `id` IN (';
@ -25,6 +27,8 @@ class Bans {
} }
$query->execute() or error(db_error()); $query->execute() or error(db_error());
rebuildThemes('bans');
} }
} }
@ -172,8 +176,6 @@ class Bans {
self::deleteBans($to_delete_list); self::deleteBans($to_delete_list);
rebuildThemes('bans');
return $found_ban; return $found_ban;
} }