image bans on their own page

git-svn-id: file:///home/shish/svn/shimmie2/trunk@1129 7f39781d-f577-437e-ae19-be835c7a54ca
This commit is contained in:
shish 2008-12-12 19:23:42 +00:00
parent ecfc4489ce
commit aa45a94dd5
2 changed files with 10 additions and 9 deletions

View file

@ -82,12 +82,16 @@ class ImageBan implements Extension {
$page->set_redirect(make_link("admin")); $page->set_redirect(make_link("admin"));
} }
} }
else if($event->get_arg(0) == "list") {
$this->theme->display_Image_hash_Bans($event->page, $this->get_image_hash_bans());
}
} }
} }
if($event instanceof AdminBuildingEvent) { if($event instanceof UserBlockBuildingEvent) {
global $page; if($event->user->is_admin()) {
$this->theme->display_Image_hash_Bans($page, $this->get_image_hash_bans()); $event->add_link("Image Bans", make_link("image_hash_ban/list"));
}
} }
if($event instanceof AddImageHashBanEvent) { if($event instanceof AddImageHashBanEvent) {

View file

@ -50,13 +50,10 @@ class ImageBanTheme extends Themelet {
</tr> </tr>
</table> </table>
"; ";
$page->add_block(new Block("Edit Image Bans", $html)); $page->set_title("Image Bans");
} $page->set_heading("Image Bans");
public function display_page($page) {
$page->set_title("Image Ban");
$page->set_heading("Image Ban");
$page->add_block(new NavBlock()); $page->add_block(new NavBlock());
$page->add_block(new Block("Edit Image Bans", $html));
} }
/* /*