diff options
author | alecpl <alec@alec.pl> | 2011-11-25 14:03:52 +0000 |
---|---|---|
committer | alecpl <alec@alec.pl> | 2011-11-25 14:03:52 +0000 |
commit | 2a3e02769d2014038675a5d8ddf18d1dba87bf2f (patch) | |
tree | 2e9a85ca04404a16538cb0a7f00c3a79d42572b5 /program | |
parent | 3ad2b1b4b0ac0fc7a6c7a5adaad9a0616b890daf (diff) |
- Merge r5489 from trunk
Diffstat (limited to 'program')
-rw-r--r-- | program/include/rcube_ldap.php | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/program/include/rcube_ldap.php b/program/include/rcube_ldap.php index c1bff53ab..bf3ec4af6 100644 --- a/program/include/rcube_ldap.php +++ b/program/include/rcube_ldap.php @@ -529,11 +529,11 @@ class rcube_ldap extends rcube_addressbook } /** - * Get all members of the given group - * - * @param string Group DN - * @param array Group entries (if called recursively) - * @return array Accumulated group members + * Get all members of the given group + * + * @param string Group DN + * @param array Group entries (if called recursively) + * @return array Accumulated group members */ function list_group_members($dn, $count = false, $entries = null) { @@ -734,9 +734,17 @@ class rcube_ldap extends rcube_addressbook $this->ldap_result = @$function($this->conn, $this->base_dn, $this->filter ? $this->filter : '(objectclass=*)', array_values($this->fieldmap), 0, (int)$this->prop['sizelimit'], (int)$this->prop['timelimit']); + $this->result = new rcube_result_set(0); + + if (!$this->ldap_result) { + $this->_debug("S: ".ldap_error($this->conn)); + return $this->result; + } + + $this->_debug("S: ".ldap_count_entries($this->conn, $this->ldap_result)." record(s)"); + // get all entries of this page and post-filter those that really match the query $search = mb_strtolower($value); - $this->result = new rcube_result_set(0); $entries = ldap_get_entries($this->conn, $this->ldap_result); for ($i = 0; $i < $entries['count']; $i++) { |