From dbb58d801c3808aefee3e845a44e90d8614bbfc3 Mon Sep 17 00:00:00 2001 From: skeeter Date: Thu, 7 Jun 2001 12:10:15 +0000 Subject: [PATCH] Fixed a problem where the type was trying to be changed from Boolean to String. Shouldn't work in php3. --- phpgwapi/inc/class.acl.inc.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/phpgwapi/inc/class.acl.inc.php b/phpgwapi/inc/class.acl.inc.php index cec0599465..1a8fa4b15f 100644 --- a/phpgwapi/inc/class.acl.inc.php +++ b/phpgwapi/inc/class.acl.inc.php @@ -552,13 +552,13 @@ @abstract ? @param $app optional defaults to $phpgw_info['flags']['currentapp']; */ - function get_grants($app=False) + function get_grants($app='') { global $phpgw, $phpgw_info; $db2 = $this->db; - if ($app==False) + if ($app=='') { $app = $phpgw_info['flags']['currentapp']; } @@ -568,10 +568,10 @@ $security = "('". $phpgw_info['user']['account_id'] ."'"; $myaccounts = CreateObject('phpgwapi.accounts'); $my_memberships = $myaccounts->memberships(); - while($my_memberships && $groups = each($my_memberships)) + @reset($my_memberships); + while($my_memberships && list($key,$group) = each($my_memberships)) { - $group = each($groups); - $security .= ",'" . $group[1]['account_id'] . "'"; + $security .= ",'" . $group['account_id'] . "'"; } $security .= ')'; $db2->query($sql . $security ,__LINE__,__FILE__);