From f92e402c14a70195a7ea505028ec2fa61fd23f00 Mon Sep 17 00:00:00 2001 From: Shish Date: Mon, 21 Feb 2011 12:15:37 +0000 Subject: [PATCH] fix adding of bans --- contrib/ipban/main.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/contrib/ipban/main.php b/contrib/ipban/main.php index 0df30dbf..508f44ed 100644 --- a/contrib/ipban/main.php +++ b/contrib/ipban/main.php @@ -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"); } // }}}