accounts_sql::members() use single sql query with join to acl table instead calling id2name for each account, as it is quicker and uses less memory

This commit is contained in:
Ralf Becker 2012-07-16 12:37:51 +00:00
parent 6b06546565
commit cc4280b184

View File

@ -280,8 +280,8 @@ class accounts_sql
$this->db->expression(acl::TABLE, array( $this->db->expression(acl::TABLE, array(
'acl_appname' => 'phpgw_group', 'acl_appname' => 'phpgw_group',
'acl_location' => $account_id, 'acl_location' => $account_id,
)), __LINE__, __FILE__, false, )), __LINE__, __FILE__, false, '', false, 0,
'JOIN '.acl::TABLE.' ON account_id=acl_owner' 'JOIN '.acl::TABLE.' ON account_id=acl_account'
) as $row) ) as $row)
{ {
$members[$row['account_id']] = $row['account_lid']; $members[$row['account_id']] = $row['account_lid'];