diff options
Diffstat (limited to 'modules/gallery/helpers')
-rw-r--r-- | modules/gallery/helpers/identity.php | 34 | ||||
-rw-r--r-- | modules/gallery/helpers/module.php | 4 |
2 files changed, 18 insertions, 20 deletions
diff --git a/modules/gallery/helpers/identity.php b/modules/gallery/helpers/identity.php index cf84c8a9..d0cba8e7 100644 --- a/modules/gallery/helpers/identity.php +++ b/modules/gallery/helpers/identity.php @@ -40,6 +40,16 @@ class identity_Core { } /** + * Frees the current instance of the identity provider so the next call to instance will reload + * + * @param string configuration + * @return Identity_Core + */ + static function reset() { + IdentityProvider::reset(); + } + + /** * Make sure that we have a session and group_ids cached in the session. */ static function load_user() { @@ -71,12 +81,12 @@ class identity_Core { $session->set("group_ids", $ids); } //} catch (Exception $e) { - //try { - //Session::instance()->destroy(); - //} catch (Exception $e) { + // try { + // Session::instance()->destroy(); + // } catch (Exception $e) { // We don't care if there was a problem destroying the session. - //} - //url::redirect(item::root()->abs_url()); + // } + // url::redirect(item::root()->abs_url()); //} } @@ -126,20 +136,6 @@ class identity_Core { } /** - * @see IdentityProvider_Driver::activate. - */ - static function activate() { - IdentityProvider::instance()->activate(); - } - - /** - * @see IdentityProvider_Driver::deactivate. - */ - static function deactivate() { - IdentityProvider::instance()->deactivate(); - } - - /** * @see IdentityProvider_Driver::guest. */ static function guest() { diff --git a/modules/gallery/helpers/module.php b/modules/gallery/helpers/module.php index 1d77e63d..9d41cd51 100644 --- a/modules/gallery/helpers/module.php +++ b/modules/gallery/helpers/module.php @@ -130,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()); @@ -154,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); |