diff options
author | Bharat Mediratta <bharat@menalto.com> | 2008-12-17 17:40:45 +0000 |
---|---|---|
committer | Bharat Mediratta <bharat@menalto.com> | 2008-12-17 17:40:45 +0000 |
commit | 130e26983aedac1e4bb9f26d6a82c629248075e8 (patch) | |
tree | db8d5b860a3a81649f8576f1fb16cde1c08725f0 /core/helpers/module.php | |
parent | 2abe82f106ecf68d40df5dee40876edd06ff5f60 (diff) |
Add initialization to the user module to put the user and group_ids
into the session, for easy access. This cuts down the number of
queries when we're loading images through file_proxy.php
Diffstat (limited to 'core/helpers/module.php')
-rw-r--r-- | core/helpers/module.php | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/core/helpers/module.php b/core/helpers/module.php index 02851528..5713901d 100644 --- a/core/helpers/module.php +++ b/core/helpers/module.php @@ -117,6 +117,8 @@ class module_Core { // // @todo get rid of this extra error checking when we have an installer. set_error_handler(array("module", "_dummy_error_handler")); + $modules = ORM::factory("module")->find_all(); + restore_error_handler(); // Reload module list from the config file since we'll do a refresh after calling install() $core = Kohana::config_load('core'); @@ -124,7 +126,7 @@ class module_Core { self::$module_names = array(); self::$modules = array(); try { - foreach (ORM::factory("module")->find_all() as $module) { + foreach ($modules as $module) { self::$module_names[] = $module->name; self::$modules[] = $module; $kohana_modules[] = MODPATH . $module->name; @@ -136,7 +138,7 @@ class module_Core { self::$modules = array(); } - restore_error_handler(); + self::event("gallery_ready"); } public function get_var($module_name, $name, $default_value=null) { |