mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-28 01:29:05 +01:00
"fixing high minimize memory usage (important for huge number of accounts)"
This commit is contained in:
parent
ca46d97abd
commit
dd41d422e9
@ -379,13 +379,16 @@ class accounts_sql
|
||||
}
|
||||
}
|
||||
$criteria[] = "egw_addressbook.account_id is not null ";
|
||||
$accounts = array();
|
||||
|
||||
if (!is_object($GLOBALS['egw']->contacts)) throw new exception('No $GLOBALS[egw]->contacts!');
|
||||
if (($contacts =& $GLOBALS['egw']->contacts->search($criteria,false,$order,"account_lid,account_type,account_status,$this->table.account_id",
|
||||
|
||||
$accounts = array();
|
||||
foreach((array) $GLOBALS['egw']->contacts->search($criteria,"1,n_given,n_family,email,id,created,modified,$this->table.account_id AS account_id",
|
||||
$order,"account_lid,account_type,account_status",
|
||||
$wildcard,false,'OR',$offset ? array($start,$offset) : is_null($start) ? false : $start,
|
||||
$filter,$this->contacts_join)))
|
||||
$filter,$this->contacts_join) as $contact)
|
||||
{
|
||||
foreach($contacts as $contact)
|
||||
if ($contact)
|
||||
{
|
||||
$accounts[] = array(
|
||||
'account_id' => ($contact['account_type'] == 'g' ? -1 : 1) * $contact['account_id'],
|
||||
|
Loading…
Reference in New Issue
Block a user