diff --git a/ext/admin/main.php b/ext/admin/main.php index da4d8d90..fd70d9b0 100644 --- a/ext/admin/main.php +++ b/ext/admin/main.php @@ -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") { diff --git a/ext/admin/theme.php b/ext/admin/theme.php index d2993a13..b60c9d0c 100644 --- a/ext/admin/theme.php +++ b/ext/admin/theme.php @@ -1,13 +1,6 @@ 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");