mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-23 22:39:00 +01:00
fixed accounts::search sometimes returning too many lines
This commit is contained in:
parent
8497dee410
commit
c92eea6284
@ -326,7 +326,6 @@ class accounts_sql
|
|||||||
*/
|
*/
|
||||||
function get_list($_type='both', $start = null,$sort = '', $order = '', $query = '', $offset = null, $query_type='')
|
function get_list($_type='both', $start = null,$sort = '', $order = '', $query = '', $offset = null, $query_type='')
|
||||||
{
|
{
|
||||||
//echo "<p>accounts_sql($_type,$start,$sort,$order,$query,$offset,$query_type)</p>\n";
|
|
||||||
static $order2contact = array(
|
static $order2contact = array(
|
||||||
'account_firstname' => 'n_given',
|
'account_firstname' => 'n_given',
|
||||||
'account_lastname' => 'n_family',
|
'account_lastname' => 'n_family',
|
||||||
@ -395,7 +394,7 @@ class accounts_sql
|
|||||||
$accounts = array();
|
$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",
|
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",
|
$order,"account_lid,account_type,account_status",
|
||||||
$wildcard,false,$query[0] == '!' ? 'AND' : 'OR',$offset ? array($start,$offset) : is_null($start) ? false : $start,
|
$wildcard,false,$query[0] == '!' ? 'AND' : 'OR',$offset ? array($start,$offset) : (is_null($start) ? false : $start),
|
||||||
$filter,$this->contacts_join) as $contact)
|
$filter,$this->contacts_join) as $contact)
|
||||||
{
|
{
|
||||||
if ($contact)
|
if ($contact)
|
||||||
@ -416,7 +415,7 @@ class accounts_sql
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
$this->total = $GLOBALS['egw']->contacts->total;
|
$this->total = $GLOBALS['egw']->contacts->total;
|
||||||
|
//error_log(__METHOD__."('$_type', $start, '$sort', '$order', '$query', $offset, '$query_type') returning ".count($accounts).'/'.$this->total);
|
||||||
return $accounts;
|
return $accounts;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user