From 7b9bcffb743b560cbc02926555ad5e18f15322ba Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Thu, 20 Jun 2013 07:45:08 +0000 Subject: [PATCH] * Admin/ActiveDirectory: fixed only first N accounts where shown and turned accidently switched off caching in session on again --- phpgwapi/inc/class.accounts_ads.inc.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/phpgwapi/inc/class.accounts_ads.inc.php b/phpgwapi/inc/class.accounts_ads.inc.php index f7b7b4f672..d9d711f196 100644 --- a/phpgwapi/inc/class.accounts_ads.inc.php +++ b/phpgwapi/inc/class.accounts_ads.inc.php @@ -783,8 +783,8 @@ class accounts_ads */ function search($param) { - //echo "

accounts_ldap::search(".print_r($param,true)."): ".microtime()."

\n"; - $account_search = array();//&$this->cache['account_search']; + //error_log(__METHOD__.'('.array2string($param).')'); + $account_search = &$this->cache['account_search']; // check if the query is cached $serial = serialize($param); @@ -892,9 +892,11 @@ class accounts_ads if(is_numeric($start) && is_numeric($offset)) { $account_search[$serial]['data'] = array_slice($sortedAccounts, $start, $offset); - $account_search[$serial]['total'] = $this->total = count($account_search[$serial]['data']); + $account_search[$serial]['total'] = $this->total; + //error_log(__METHOD__.'('.array2string($param).") returning $offset/$this->total entries from $start ".array2string($account_search[$serial]['data'])); return $account_search[$serial]['data']; } + //error_log(__METHOD__.'('.array2string($param).') returning all '.array2string($sortedAccounts)); return $sortedAccounts; }