IP Ban list on its own page
git-svn-id: file:///home/shish/svn/shimmie2/trunk@801 7f39781d-f577-437e-ae19-be835c7a54ca
This commit is contained in:
parent
de09735e69
commit
f7218a677d
@ -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 {{{
|
||||
|
@ -42,6 +42,9 @@ class IPBanTheme extends Themelet {
|
||||
</tr>
|
||||
</table>
|
||||
";
|
||||
$page->set_title("IP Bans");
|
||||
$page->set_heading("IP Bans");
|
||||
$page->add_block(new NavBlock());
|
||||
$page->add_block(new Block("Edit IP Bans", $html));
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user