summaryrefslogtreecommitdiff
path: root/core/helpers
diff options
context:
space:
mode:
authorBharat Mediratta <bharat@menalto.com>2008-12-17 19:04:20 +0000
committerBharat Mediratta <bharat@menalto.com>2008-12-17 19:04:20 +0000
commit26f0b4e44d90230f5a3f292b36f1e65b6eb32365 (patch)
treec92a1307cd1dbde80df82c1cc0f83a2881a81af5 /core/helpers
parentd1c737ffac4f0574f3fd649bc7cb191297d87365 (diff)
Clear out module list in load_modules() before trying any db operations
Diffstat (limited to 'core/helpers')
-rw-r--r--core/helpers/module.php11
1 files changed, 6 insertions, 5 deletions
diff --git a/core/helpers/module.php b/core/helpers/module.php
index c26a8257..2b9a919d 100644
--- a/core/helpers/module.php
+++ b/core/helpers/module.php
@@ -111,6 +111,12 @@ class module_Core {
}
public static function load_modules() {
+ // Reload module list from the config file since we'll do a refresh after calling install()
+ $core = Kohana::config_load('core');
+ $kohana_modules = $core['modules'];
+ self::$module_names = array();
+ self::$modules = array();
+
// This is one of the first database operations that we'll do, so it may fail if there's no
// install yet. Try to handle this situation gracefully expecting that the scaffolding will
// Do The Right Thing.
@@ -122,11 +128,6 @@ class module_Core {
return;
}
- // Reload module list from the config file since we'll do a refresh after calling install()
- $core = Kohana::config_load('core');
- $kohana_modules = $core['modules'];
- self::$module_names = array();
- self::$modules = array();
try {
foreach ($modules as $module) {
self::$module_names[] = $module->name;