From 8c570fcb19d6f5148156801c85dd8554a63b2c47 Mon Sep 17 00:00:00 2001 From: Miles Lott Date: Sat, 4 Aug 2001 14:26:10 +0000 Subject: [PATCH] php3 fix, rename accounts->memberships() to accounts->membership() to avoid conflict with class var --- admin/editaccount.php | 2 +- admin/viewaccount.php | 2 +- phpgwapi/inc/class.accounts_shared.inc.php | 2 +- phpgwapi/inc/class.acl.inc.php | 4 ++-- phpgwapi/inc/class.common.inc.php | 4 ++-- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/admin/editaccount.php b/admin/editaccount.php index 7d5eac4ab7..ef96240cb0 100755 --- a/admin/editaccount.php +++ b/admin/editaccount.php @@ -59,7 +59,7 @@ { $account = CreateObject('phpgwapi.accounts',$_account_id); $userData = $account->read_repository(); - $userGroups = $account->memberships($_account_id); + $userGroups = $account->membership($_account_id); $allGroups = $account->get_list('groups'); if ($userData['expires'] == -1) diff --git a/admin/viewaccount.php b/admin/viewaccount.php index e5e90c318c..5df809c506 100755 --- a/admin/viewaccount.php +++ b/admin/viewaccount.php @@ -140,7 +140,7 @@ } // Find out which groups they are members of - $usergroups = $account->memberships(intval($account_id)); + $usergroups = $account->membership(intval($account_id)); if (gettype($usergroups) != 'array') { $t->set_var('groups_select',lang('None')); diff --git a/phpgwapi/inc/class.accounts_shared.inc.php b/phpgwapi/inc/class.accounts_shared.inc.php index a91138290a..3c41cb770a 100644 --- a/phpgwapi/inc/class.accounts_shared.inc.php +++ b/phpgwapi/inc/class.accounts_shared.inc.php @@ -78,7 +78,7 @@ return $this->data; } - function memberships($accountid = '') + function membership($accountid = '') { global $phpgw_info, $phpgw; $account_id = get_account_id($accountid); diff --git a/phpgwapi/inc/class.acl.inc.php b/phpgwapi/inc/class.acl.inc.php index dc77ee42fa..b88e3b4da0 100644 --- a/phpgwapi/inc/class.acl.inc.php +++ b/phpgwapi/inc/class.acl.inc.php @@ -522,7 +522,7 @@ $db2 = $this->db; $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 " . 'acl_account in '; $security = '('.$account_id; @@ -572,7 +572,7 @@ // $security = "('". $phpgw_info['user']['account_id'] ."'"; $security = "('". $this->account_id ."'"; $myaccounts = CreateObject('phpgwapi.accounts'); - $my_memberships = $myaccounts->memberships($this->account_id); + $my_memberships = $myaccounts->membership($this->account_id); unset($myaccounts); @reset($my_memberships); while($my_memberships && list($key,$group) = each($my_memberships)) diff --git a/phpgwapi/inc/class.common.inc.php b/phpgwapi/inc/class.common.inc.php index 700cf7d030..0fbd16abc9 100644 --- a/phpgwapi/inc/class.common.inc.php +++ b/phpgwapi/inc/class.common.inc.php @@ -109,13 +109,13 @@ { 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 = ''; if (!$owner) { $owner = $phpgw_info['user']['account_id']; } - $groups = $phpgw->accounts->memberships(intval($owner)); + $groups = $phpgw->accounts->membership(intval($owner)); if (gettype($groups) == 'array') { while ($group = each($groups))