From 6a76d6f747768106f8bccd8b74059371dbac615a Mon Sep 17 00:00:00 2001 From: Tim Almdal Date: Fri, 28 Nov 2008 21:22:34 +0000 Subject: Dynamically create the list of available modules. This permits new modules to be added without having to update the config.php file --- core/controllers/welcome.php | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'core/controllers') diff --git a/core/controllers/welcome.php b/core/controllers/welcome.php index a75b225f..5cf6d7bf 100644 --- a/core/controllers/welcome.php +++ b/core/controllers/welcome.php @@ -346,16 +346,13 @@ class Welcome_Controller extends Template_Controller { private function _read_modules() { $modules = array(); try { - $installed = ORM::factory("module")->find_all(); + $installed = module::installed(); foreach ($installed as $installed_module) { $modules[$installed_module->name] = $installed_module->version; } - foreach (glob(MODPATH . "*/helpers/*_installer.php") as $file) { - if (empty($modules[basename(dirname(dirname($file)))])) { - $modules[basename(dirname(dirname($file)))] = 0; - } - } + $modules = module::available($modules); + } catch (Exception $e) { // The database may not be installed } -- cgit v1.2.3