diff options
author | Bharat Mediratta <bharat@menalto.com> | 2009-05-28 21:00:06 -0700 |
---|---|---|
committer | Bharat Mediratta <bharat@menalto.com> | 2009-05-28 21:00:06 -0700 |
commit | d088a41747af4f0da93d8a3ba926d557f157b507 (patch) | |
tree | 54a72b06e02da44c6841fc3d91f70b41813b6a7c | |
parent | 20a2d9f9a8bc0f69b3ebef846a88869870e4e0c4 (diff) |
Load the gallery module in load_modules(), but put it at the end of
the module list (to match its location in the cascading filesystem)
-rw-r--r-- | modules/gallery/helpers/module.php | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/modules/gallery/helpers/module.php b/modules/gallery/helpers/module.php index d684033b..8abfa36d 100644 --- a/modules/gallery/helpers/module.php +++ b/modules/gallery/helpers/module.php @@ -204,14 +204,20 @@ class module_Core { self::$modules = array(); self::$active = array(); $kohana_modules = array(); - foreach (ORM::factory("module")->where("name <>", "gallery")->find_all() as $module) { + foreach (ORM::factory("module")->find_all() as $module) { self::$modules[$module->name] = $module; - if ($module->active) { + if (!$module->active) { + continue; + } + + if ($module->name == "gallery") { + $gallery = $module; + } else { self::$active[] = $module; + $kohana_modules[] = MODPATH . $module->name; } - $kohana_modules[] = MODPATH . $module->name; } - + self::$active[] = $gallery; // put gallery last in the module list to match core.modules Kohana::config_set( "core.modules", array_merge($kohana_modules, Kohana::config("core.modules"))); } |