Trying to determine if variables are getting their types messed up.

This commit is contained in:
skeeter 2001-03-18 16:29:05 +00:00
parent 1728149882
commit 94f59cfde8
2 changed files with 6 additions and 4 deletions

View File

@ -83,10 +83,11 @@
return False; return False;
} }
$this->memberships = Array();
for ($idx=0; $idx<count($security_equals); $idx++) for ($idx=0; $idx<count($security_equals); $idx++)
{ {
$name = $this->id2name(intval($security_equals[$idx])); $this->memberships[] = Array('account_id' => intval($security_equals[$idx]), 'account_name' => $this->id2name(intval($security_equals[$idx])));
$this->memberships[] = Array('account_id' => $security_equals[$idx], 'account_name' => $name);
} }
return $this->memberships; return $this->memberships;

View File

@ -379,9 +379,10 @@ It should use the values in the $this->data
$rights = 0; $rights = 0;
if ($this->db->num_rows() == 0 ){ return False; } if ($this->db->num_rows() == 0 ){ return False; }
while ($this->db->next_record()) { while ($this->db->next_record()) {
$rights = 0;
$rights |= $this->db->f('acl_rights'); $rights |= $this->db->f('acl_rights');
if (!!($rights & $required) == True){ if (!!($rights & $required) == True){
$accounts[] = $this->db->f('acl_account'); $accounts[] = intval($this->db->f('acl_account'));
} }
} }
return $accounts; return $accounts;
@ -438,7 +439,7 @@ It should use the values in the $this->data
$sql = "select acl_account, acl_rights from phpgw_acl where acl_appname = '$app' and " $sql = "select acl_account, acl_rights from phpgw_acl where acl_appname = '$app' and "
. "acl_location in "; . "acl_location in ";
$security = "('". $phpgw_info['user']['account_id'] ."'"; $security = "('". $phpgw_info['user']['account_id'] ."'";
$my_memberships = $phpgw->accounts->memberships($phpgw_info['user']['account_id']); $my_memberships = $phpgw->accounts->memberships(intval($phpgw_info['user']['account_id']));
while($groups = each($my_memberships)) while($groups = each($my_memberships))
{ {
$group = each($groups); $group = each($groups);