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_modules.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'core/controllers/admin_modules.php') diff --git a/core/controllers/admin_modules.php b/core/controllers/admin_modules.php index ada7dcfd..152e49c3 100644 --- a/core/controllers/admin_modules.php +++ b/core/controllers/admin_modules.php @@ -19,9 +19,10 @@ */ class Admin_Modules_Controller extends Admin_Controller { public function index() { - $view = new View("admin_modules.html"); - $view->available = module::available(); - return $view; + $view = new Admin_View("admin.html"); + $view->content = new View("admin_modules.html"); + $view->content->available = module::available(); + print $view; } public function save() { -- cgit v1.2.3