use display_error

git-svn-id: file:///home/shish/svn/shimmie2/trunk@394 7f39781d-f577-437e-ae19-be835c7a54ca
This commit is contained in:
shish 2007-07-28 20:00:05 +00:00
parent c742614828
commit 29829efc66
2 changed files with 1 additions and 8 deletions

View file

@ -21,7 +21,7 @@ class AdminPage extends Extension {
if(is_a($event, 'PageRequestEvent') && ($event->page_name == "admin")) {
global $user;
if(!$user->is_admin()) {
$this->theme->display_not_admin($event->page);
$this->theme->display_error($event->page, "Permission Denied", "This page is for admins only");
}
else {
if($event->get_arg(0) == "delete_image") {

View file

@ -1,13 +1,6 @@
<?php
class AdminPageTheme extends Themelet {
public function display_not_admin($page) {
$page->set_title("Error");
$page->set_heading("Error");
$page->add_block(new NavBlock());
$page->add_block(new Block("Permission Denied", "This page is for admins only"));
}
public function display_page($page) {
$page->set_title("Admin Tools");
$page->set_heading("Admin Tools");