- Add some debug and error handling around vlv_search

pull/1/head
alecpl 13 years ago
parent d0924d48d8
commit 9b33118bf5

@ -742,9 +742,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++) {

Loading…
Cancel
Save