diff --git a/ext/ipban/main.php b/ext/ipban/main.php index 2c03be6a..33c18397 100644 --- a/ext/ipban/main.php +++ b/ext/ipban/main.php @@ -61,6 +61,16 @@ class IPBan extends Extension { $page->set_redirect(make_link("admin")); } } + else if($event->get_arg(0) == "list") { + global $page; + $this->theme->display_bans($page, $this->get_bans()); + } + } + } + + if(is_a($event, 'UserBlockBuildingEvent')) { + if($event->user->is_admin()) { + $event->add_link("IP Bans", make_link("ip_ban/list")); } } @@ -72,11 +82,6 @@ class IPBan extends Extension { if(is_a($event, 'RemoveIPBanEvent')) { $this->remove_ip_ban($event->id); } - - if(is_a($event, 'AdminBuildingEvent')) { - global $page; - $this->theme->display_bans($page, $this->get_bans()); - } } // }}} // installer {{{ diff --git a/ext/ipban/theme.php b/ext/ipban/theme.php index 63d3eba5..43ddc0fa 100644 --- a/ext/ipban/theme.php +++ b/ext/ipban/theme.php @@ -42,6 +42,9 @@ class IPBanTheme extends Themelet { "; + $page->set_title("IP Bans"); + $page->set_heading("IP Bans"); + $page->add_block(new NavBlock()); $page->add_block(new Block("Edit IP Bans", $html)); } }