properly support null ends

git-svn-id: file:///home/shish/svn/shimmie2/trunk@364 7f39781d-f577-437e-ae19-be835c7a54ca
This commit is contained in:
shish 2007-07-24 13:25:11 +00:00
parent 101bbeecee
commit e0029a83fe

View File

@ -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");