now that the cache key has changed, the invalidation needs updating...
This commit is contained in:
parent
2d334e08ea
commit
9db912d996
1 changed files with 2 additions and 2 deletions
|
@ -92,7 +92,7 @@ class IPBan extends SimpleExtension {
|
|||
public function onRemoveIPBan($event) {
|
||||
global $database;
|
||||
$database->Execute("DELETE FROM bans WHERE id = :id", array("id"=>$event->id));
|
||||
$database->cache->delete("ip_bans");
|
||||
$database->cache->delete("ip_bans_sorted");
|
||||
}
|
||||
|
||||
// installer {{{
|
||||
|
@ -261,7 +261,7 @@ class IPBan extends SimpleExtension {
|
|||
global $database;
|
||||
$sql = "INSERT INTO bans (ip, reason, end_timestamp, banner_id) VALUES (:ip, :reason, :end, :admin_id)";
|
||||
$database->Execute($sql, array("ip"=>$ip, "reason"=>$reason, "end"=>strtotime($end), "admin_id"=>$user->id));
|
||||
$database->cache->delete("ip_bans");
|
||||
$database->cache->delete("ip_bans_sorted");
|
||||
log_info("ipban", "'$user->name' has banned '$ip' because '$reason' until '$end'");
|
||||
}
|
||||
// }}}
|
||||
|
|
Reference in a new issue