php3 fix, rename accounts->memberships() to accounts->membership() to avoid conflict with class var

This commit is contained in:
Miles Lott 2001-08-04 14:26:10 +00:00
parent de68820130
commit 8c570fcb19
5 changed files with 7 additions and 7 deletions

View File

@ -59,7 +59,7 @@
{ {
$account = CreateObject('phpgwapi.accounts',$_account_id); $account = CreateObject('phpgwapi.accounts',$_account_id);
$userData = $account->read_repository(); $userData = $account->read_repository();
$userGroups = $account->memberships($_account_id); $userGroups = $account->membership($_account_id);
$allGroups = $account->get_list('groups'); $allGroups = $account->get_list('groups');
if ($userData['expires'] == -1) if ($userData['expires'] == -1)

View File

@ -140,7 +140,7 @@
} }
// Find out which groups they are members of // Find out which groups they are members of
$usergroups = $account->memberships(intval($account_id)); $usergroups = $account->membership(intval($account_id));
if (gettype($usergroups) != 'array') if (gettype($usergroups) != 'array')
{ {
$t->set_var('groups_select',lang('None')); $t->set_var('groups_select',lang('None'));

View File

@ -78,7 +78,7 @@
return $this->data; return $this->data;
} }
function memberships($accountid = '') function membership($accountid = '')
{ {
global $phpgw_info, $phpgw; global $phpgw_info, $phpgw;
$account_id = get_account_id($accountid); $account_id = get_account_id($accountid);

View File

@ -522,7 +522,7 @@
$db2 = $this->db; $db2 = $this->db;
$account_id = get_account_id($accountid,$this->account_id); $account_id = get_account_id($accountid,$this->account_id);
$memberships = $phpgw->accounts->memberships($account_id); $memberships = $phpgw->accounts->membership($account_id);
$sql = "select acl_appname, acl_rights from phpgw_acl where acl_location = 'run' and " $sql = "select acl_appname, acl_rights from phpgw_acl where acl_location = 'run' and "
. 'acl_account in '; . 'acl_account in ';
$security = '('.$account_id; $security = '('.$account_id;
@ -572,7 +572,7 @@
// $security = "('". $phpgw_info['user']['account_id'] ."'"; // $security = "('". $phpgw_info['user']['account_id'] ."'";
$security = "('". $this->account_id ."'"; $security = "('". $this->account_id ."'";
$myaccounts = CreateObject('phpgwapi.accounts'); $myaccounts = CreateObject('phpgwapi.accounts');
$my_memberships = $myaccounts->memberships($this->account_id); $my_memberships = $myaccounts->membership($this->account_id);
unset($myaccounts); unset($myaccounts);
@reset($my_memberships); @reset($my_memberships);
while($my_memberships && list($key,$group) = each($my_memberships)) while($my_memberships && list($key,$group) = each($my_memberships))

View File

@ -109,13 +109,13 @@
{ {
global $phpgw, $phpgw_info; global $phpgw, $phpgw_info;
$this->debug_info[] = 'sql_search() is a depreciated function - use ACL instead'; $this->debug_info[] = 'sql_search() is a deprecated function - use ACL instead';
$s = ''; $s = '';
if (!$owner) if (!$owner)
{ {
$owner = $phpgw_info['user']['account_id']; $owner = $phpgw_info['user']['account_id'];
} }
$groups = $phpgw->accounts->memberships(intval($owner)); $groups = $phpgw->accounts->membership(intval($owner));
if (gettype($groups) == 'array') if (gettype($groups) == 'array')
{ {
while ($group = each($groups)) while ($group = each($groups))