Fixed a problem where the type was trying to be changed from Boolean to String. Shouldn't work in php3.

This commit is contained in:
skeeter 2001-06-07 12:10:15 +00:00
parent 548b5ba431
commit dbb58d801c

View File

@ -552,13 +552,13 @@
@abstract ? @abstract ?
@param $app optional defaults to $phpgw_info['flags']['currentapp']; @param $app optional defaults to $phpgw_info['flags']['currentapp'];
*/ */
function get_grants($app=False) function get_grants($app='')
{ {
global $phpgw, $phpgw_info; global $phpgw, $phpgw_info;
$db2 = $this->db; $db2 = $this->db;
if ($app==False) if ($app=='')
{ {
$app = $phpgw_info['flags']['currentapp']; $app = $phpgw_info['flags']['currentapp'];
} }
@ -568,10 +568,10 @@
$security = "('". $phpgw_info['user']['account_id'] ."'"; $security = "('". $phpgw_info['user']['account_id'] ."'";
$myaccounts = CreateObject('phpgwapi.accounts'); $myaccounts = CreateObject('phpgwapi.accounts');
$my_memberships = $myaccounts->memberships(); $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['account_id'] . "'";
$security .= ",'" . $group[1]['account_id'] . "'";
} }
$security .= ')'; $security .= ')';
$db2->query($sql . $security ,__LINE__,__FILE__); $db2->query($sql . $security ,__LINE__,__FILE__);