From d088a41747af4f0da93d8a3ba926d557f157b507 Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Thu, 28 May 2009 21:00:06 -0700 Subject: 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) --- modules/gallery/helpers/module.php | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'modules/gallery/helpers/module.php') 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"))); } -- cgit v1.2.3