summaryrefslogtreecommitdiff
path: root/core/controllers
diff options
context:
space:
mode:
authorTim Almdal <tnalmdal@shaw.ca>2008-11-28 21:22:34 +0000
committerTim Almdal <tnalmdal@shaw.ca>2008-11-28 21:22:34 +0000
commit6a76d6f747768106f8bccd8b74059371dbac615a (patch)
tree4075552e99833a5a721ca17f6815bacb7baa0fc4 /core/controllers
parent8b6ed6c477771e42d43ea0684e5139cf361b6cee (diff)
Dynamically create the list of available modules. This permits new modules to be added without having to update the config.php file
Diffstat (limited to 'core/controllers')
-rw-r--r--core/controllers/welcome.php9
1 files changed, 3 insertions, 6 deletions
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
}