summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--core/helpers/module.php35
-rw-r--r--modules/user/helpers/user.php12
2 files changed, 8 insertions, 39 deletions
diff --git a/core/helpers/module.php b/core/helpers/module.php
index 82c69627..8f815b61 100644
--- a/core/helpers/module.php
+++ b/core/helpers/module.php
@@ -149,38 +149,17 @@ class module_Core {
// 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"];
+ $modules = ORM::factory("module")->find_all();
- 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.
- // Reverting from installer stage 1.
- // @todo get rid of this extra error checking when we have an installer.
- set_error_handler(array("module", "dummy_error_handler"));
- try {
- $modules = ORM::factory("module")->find_all();
- } catch (Exception $e) {
- return;
- }
-
- try {
- foreach ($modules as $module) {
- self::$module_names[$module->name] = $module->name;
- self::$modules[$module->name] = $module;
- $kohana_modules[] = MODPATH . $module->name;
- }
-
- Kohana::config_set("core.modules", $kohana_modules);
- } catch (Exception $e) {
- self::$module_names = array();
- self::$modules = array();
+ foreach ($modules as $module) {
+ self::$module_names[$module->name] = $module->name;
+ self::$modules[$module->name] = $module;
+ $kohana_modules[] = MODPATH . $module->name;
}
+ Kohana::config_set("core.modules", $kohana_modules);
self::event("gallery_ready");
}
- static function dummy_error_handler() { }
/**
* Run a specific event on all active modules.
@@ -248,7 +227,7 @@ class module_Core {
$var->name = $name;
}
$var->value = $value;
- $var->save();
+ $var->save();
self::$var_cache[$module_name][$name] = $value;
}
diff --git a/modules/user/helpers/user.php b/modules/user/helpers/user.php
index dbb9b613..93f07629 100644
--- a/modules/user/helpers/user.php
+++ b/modules/user/helpers/user.php
@@ -113,17 +113,7 @@ class user_Core {
* Make sure that we have a session and group_ids cached in the session.
*/
static function load_user() {
- // This is one of the first session 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.
- //
- // @todo get rid of this extra error checking when we have an installer.
- try {
- $session = Session::instance();
- } catch (Exception $e) {
- return;
- }
-
+ $session = Session::instance();
if (!($user = $session->get("user"))) {
$session->set("user", $user = user::guest());
}