fix adding of bans

This commit is contained in:
Shish 2011-02-21 12:15:37 +00:00
parent b1cb655adc
commit f92e402c14

View file

@ -223,8 +223,8 @@ class IPBan implements Extension {
private function add_ip_ban($ip, $reason, $end, $user) {
global $database;
$sql = "INSERT INTO bans (ip, reason, end_timestamp, banner_id) VALUES (?, ?, ?, ?)";
$database->Execute($sql, array($ip, $reason, strtotime($end), $user->id));
$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");
}
// }}}