mirror of
https://github.com/vichan-devel/vichan.git
synced 2024-11-23 23:20:57 +01:00
bans.php: rebuild themes only if bans are deleted
This commit is contained in:
parent
67b88ec78f
commit
3e3fa057d5
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user