From c7193f9b2ede6ed913d16a9a8047b6867b8afada Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Wed, 24 Dec 2008 04:22:22 +0000 Subject: Normalize our Admin controllers so that functions always print out their results, as opposed to having them return their view back upstream. This is a little more code in every controller, but it's much less magical and more consistent. Look up the active_theme and active_admin_theme inside the view itself, no need to do that in the controllers. This makes view initialization easier in the controllers. --- core/controllers/admin_dashboard.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'core/controllers/admin_dashboard.php') diff --git a/core/controllers/admin_dashboard.php b/core/controllers/admin_dashboard.php index 13ec5d82..bd295b84 100644 --- a/core/controllers/admin_dashboard.php +++ b/core/controllers/admin_dashboard.php @@ -19,7 +19,9 @@ */ class Admin_Dashboard_Controller extends Admin_Controller { public function index() { - return $this->theme()->admin_dashboard_blocks(); + $view = new Admin_View("admin.html"); + $view->content = $view->admin_dashboard_blocks(); + print $view; } } -- cgit v1.2.3