diff options
Diffstat (limited to 'modules/gallery/helpers/module.php')
-rw-r--r-- | modules/gallery/helpers/module.php | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/modules/gallery/helpers/module.php b/modules/gallery/helpers/module.php index 5b34f453..9d41cd51 100644 --- a/modules/gallery/helpers/module.php +++ b/modules/gallery/helpers/module.php @@ -103,7 +103,8 @@ class module_Core { // Lock certain modules $modules->gallery->locked = true; - $modules->user->locked = true; + $identity_module = self::get_var("gallery", "identity_provider", "user"); + $modules->$identity_module->locked = true; $modules->ksort(); self::$available = $modules; } @@ -129,6 +130,8 @@ class module_Core { array_unshift($kohana_modules, MODPATH . $module_name); Kohana::config_set("core.modules", $kohana_modules); + // Rebuild the include path so the module installer can benefit from auto loading + Kohana::include_paths(true); $installer_class = "{$module_name}_installer"; if (method_exists($installer_class, "install")) { call_user_func_array(array($installer_class, "install"), array()); @@ -153,7 +156,7 @@ class module_Core { */ static function upgrade($module_name) { $kohana_modules = Kohana::config("core.modules"); - array_unshift($kohana_modules, MODPATH . $module_name); + $kohana_modules = array_unshift($kohana_modules, MODPATH . $module_name); Kohana::config_set("core.modules", $kohana_modules); $version_before = module::get_version($module_name); |