From 9af953e2b16f24440ac8a7e58d290744e4ceb5e5 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Wed, 17 Jul 2013 13:14:08 +0000 Subject: [PATCH] fixed accounts::search sometimes returning too many lines --- phpgwapi/inc/class.accounts_sql.inc.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/phpgwapi/inc/class.accounts_sql.inc.php b/phpgwapi/inc/class.accounts_sql.inc.php index cb0503c38b..bbaf232083 100644 --- a/phpgwapi/inc/class.accounts_sql.inc.php +++ b/phpgwapi/inc/class.accounts_sql.inc.php @@ -369,7 +369,6 @@ class accounts_sql */ function get_list($_type='both', $start = null,$sort = '', $order = '', $query = '', $offset = null, $query_type='', $active=false) { - //echo "

accounts_sql($_type,$start,$sort,$order,$query,$offset,$query_type)

\n"; static $order2contact = array( 'account_firstname' => 'n_given', 'account_lastname' => 'n_family', @@ -442,7 +441,7 @@ class accounts_sql $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,account_expires,account_primary_group", - $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) { if ($contact) @@ -465,7 +464,7 @@ class accounts_sql } } $this->total = $GLOBALS['egw']->contacts->total; - + //error_log(__METHOD__."('$_type', $start, '$sort', '$order', '$query', $offset, '$query_type') returning ".count($accounts).'/'.$this->total); return $accounts; }