From e0029a83fea7d9c623edc5feb5edb4f0a1604594 Mon Sep 17 00:00:00 2001 From: shish Date: Tue, 24 Jul 2007 13:25:11 +0000 Subject: [PATCH] properly support null ends git-svn-id: file:///home/shish/svn/shimmie2/trunk@364 7f39781d-f577-437e-ae19-be835c7a54ca --- ext/ipban/main.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ext/ipban/main.php b/ext/ipban/main.php index 5742bfc8..3b99eff7 100644 --- a/ext/ipban/main.php +++ b/ext/ipban/main.php @@ -43,7 +43,9 @@ class IPBan extends Extension { if($user->is_admin()) { if($event->get_arg(0) == "add") { if(isset($_POST['ip']) && isset($_POST['reason']) && isset($_POST['end'])) { - send_event(new AddIPBanEvent($_POST['ip'], $_POST['reason'], $_POST['end'])); + if(empty($_POST['end'])) $end = null; + else $end = $_POST['end']; + send_event(new AddIPBanEvent($_POST['ip'], $_POST['reason'], $end)); global $page; $page->set_mode("redirect");