From 0736cf203b37534848482e47c3afde9b58d6ce27 Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Thu, 17 Dec 2009 21:32:53 -0800 Subject: In Kohana 2.4, ORM no longer does the find_all() call for us when we retrieve related ORMs. If we tack a find_all() on the end, it breaks the User_Definition interface so create User_Model::groups() and Groups_Model::users() as glue. --- modules/gallery/helpers/access.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'modules/gallery/helpers/access.php') diff --git a/modules/gallery/helpers/access.php b/modules/gallery/helpers/access.php index 85410085..8ce7e436 100644 --- a/modules/gallery/helpers/access.php +++ b/modules/gallery/helpers/access.php @@ -101,7 +101,7 @@ class access_Core { $resource = $perm_name == "view" ? $item : model_cache::get("access_cache", $item->id, "item_id"); - foreach ($user->groups->find_all() as $group) { + foreach ($user->groups() as $group) { if ($resource->__get("{$perm_name}_{$group->id}") === self::ALLOW) { return true; } -- cgit v1.2.3