From 29829efc668250588cd9ed4d2f691f804194c052 Mon Sep 17 00:00:00 2001 From: shish Date: Sat, 28 Jul 2007 20:00:05 +0000 Subject: [PATCH] use display_error git-svn-id: file:///home/shish/svn/shimmie2/trunk@394 7f39781d-f577-437e-ae19-be835c7a54ca --- ext/admin/main.php | 2 +- ext/admin/theme.php | 7 ------- 2 files changed, 1 insertion(+), 8 deletions(-) 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");