forked from leftypol/leftypol
bans.php: rebuild themes only if bans are deleted
This commit is contained in:
parent
b009fc749e
commit
81f132dcf9
1 changed files with 4 additions and 2 deletions
|
@ -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');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -173,8 +177,6 @@ class Bans {
|
||||||
|
|
||||||
self::deleteBans($to_delete_list);
|
self::deleteBans($to_delete_list);
|
||||||
|
|
||||||
rebuildThemes('bans');
|
|
||||||
|
|
||||||
return $found_ban;
|
return $found_ban;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue