summaryrefslogtreecommitdiff
path: root/core/helpers
diff options
context:
space:
mode:
Diffstat (limited to 'core/helpers')
-rw-r--r--core/helpers/access.php4
-rw-r--r--core/helpers/module.php6
2 files changed, 6 insertions, 4 deletions
diff --git a/core/helpers/access.php b/core/helpers/access.php
index 05799bf5..82d7b9b6 100644
--- a/core/helpers/access.php
+++ b/core/helpers/access.php
@@ -98,8 +98,8 @@ class access_Core {
$resource = $perm_name == "view" ?
$item : model_cache::get("access_cache", $item->id, "item_id");
- foreach (user::active()->groups as $group) {
- if ($resource->__get("{$perm_name}_{$group->id}") === self::ALLOW) {
+ foreach (user::group_ids() as $id) {
+ if ($resource->__get("{$perm_name}_$id") === self::ALLOW) {
return true;
}
}
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) {