From a5c24a7b3e3455429b1fabf15cb8ce3340d5ab89 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Fri, 4 Nov 2005 07:01:23 +0000 Subject: [PATCH] backported two bugfixes from HEAD: 1) fixed bug report by Dros on the german list: using account in ldap, nextmatch (eg. in setting group ACL's) is not working 2) implemented the same default, as for the sql class: everything which is not 'accounts' or 'groups' --- phpgwapi/inc/class.accounts_ldap.inc.php | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/phpgwapi/inc/class.accounts_ldap.inc.php b/phpgwapi/inc/class.accounts_ldap.inc.php index 4108a36e81..05f145063c 100644 --- a/phpgwapi/inc/class.accounts_ldap.inc.php +++ b/phpgwapi/inc/class.accounts_ldap.inc.php @@ -458,7 +458,7 @@ //print "\$_type=$_type, \$start=$start , \$sort=$sort, \$order=$order, \$query=$query, \$offset=$offset, \$query_type=$query_type
"; $query = strtolower($query); - if($_type == 'accounts' || $_type == 'both') + if($_type != 'groups') { $filter = "(&(uidnumber=*)(phpgwaccounttype=u)"; if (!empty($query) && $query != '*') @@ -511,7 +511,7 @@ } } } - if ($_type == 'groups' || $_type == 'both') + if ($_type != 'accounts') { if(empty($query) || $query == '*') { @@ -551,15 +551,14 @@ $this->total = count($accounts); // return only the wanted accounts - if (is_array($sortedAccounts)) { reset($sortedAccounts); - if(is_int($start) && is_int($offset)) + if(is_numeric($start) && is_numeric($offset)) { return array_slice($sortedAccounts, $start, $offset); } - elseif(is_int($start)) + elseif(is_numeric($start)) { return array_slice($sortedAccounts, $start, $GLOBALS['phpgw_info']['user']['preferences']['common']['maxmatchs']); }