From 6c87e540d6cc4e09f2afcc3e5346820766c8f3b6 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Mon, 13 Jun 2016 14:52:49 +0200 Subject: [PATCH] * Resources: fix PHP Fatal call to undefined method Api\Accounts::get_list() when editing ACL --- resources/inc/class.resources_acl_bo.inc.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/resources/inc/class.resources_acl_bo.inc.php b/resources/inc/class.resources_acl_bo.inc.php index 03eca63b8e..af099bedb6 100755 --- a/resources/inc/class.resources_acl_bo.inc.php +++ b/resources/inc/class.resources_acl_bo.inc.php @@ -244,9 +244,8 @@ class resources_acl_bo $GLOBALS['egw']->acl->delete_repository('resources','L' . $cat_id,false); - foreach($GLOBALS['egw']->accounts->get_list() as $num => $account) + foreach(array_unique(array_intersect($readcat, $writecat, $calreadcat, $calbookcat, $admincat)) as $account_id) { - $account_id = $account['account_id']; $rights = false; $rights = in_array($account_id,$readcat) ? ($rights | Acl::READ) : false; $rights = in_array($account_id,$writecat) ? ($rights | Acl::READ | Acl::ADD | Acl::EDIT | Acl::DELETE): $rights;