|
|
@ -586,6 +586,7 @@ class rcube_ldap extends rcube_addressbook
|
|
|
|
|
|
|
|
|
|
|
|
// filter entries for this page
|
|
|
|
// filter entries for this page
|
|
|
|
for ($i = $start_row; $i < min($entries['count'], $last_row); $i++)
|
|
|
|
for ($i = $start_row; $i < min($entries['count'], $last_row); $i++)
|
|
|
|
|
|
|
|
if ($entries[$i])
|
|
|
|
$this->result->add($this->_ldap2result($entries[$i]));
|
|
|
|
$this->result->add($this->_ldap2result($entries[$i]));
|
|
|
|
|
|
|
|
|
|
|
|
return $this->result;
|
|
|
|
return $this->result;
|
|
|
@ -933,6 +934,7 @@ class rcube_ldap extends rcube_addressbook
|
|
|
|
|
|
|
|
|
|
|
|
// we have a search result resource, get all entries
|
|
|
|
// we have a search result resource, get all entries
|
|
|
|
if (!$count && $result) {
|
|
|
|
if (!$count && $result) {
|
|
|
|
|
|
|
|
$result_count = $result->count();
|
|
|
|
$result = $result->entries();
|
|
|
|
$result = $result->entries();
|
|
|
|
unset($result['count']);
|
|
|
|
unset($result['count']);
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -958,10 +960,11 @@ class rcube_ldap extends rcube_addressbook
|
|
|
|
if ($count && $res) {
|
|
|
|
if ($count && $res) {
|
|
|
|
$result += $res;
|
|
|
|
$result += $res;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else if (!$count && $res && $res->count()) {
|
|
|
|
else if (!$count && $res && ($res_count = $res->count())) {
|
|
|
|
$res = $res->entries();
|
|
|
|
$res = $res->entries();
|
|
|
|
unset($res['count']);
|
|
|
|
unset($res['count']);
|
|
|
|
$result = array_merge($result, $res);
|
|
|
|
$result = array_merge($result, $res);
|
|
|
|
|
|
|
|
$result_count += $res_count;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -971,7 +974,7 @@ class rcube_ldap extends rcube_addressbook
|
|
|
|
usort($result, array($this, '_entry_sort_cmp'));
|
|
|
|
usort($result, array($this, '_entry_sort_cmp'));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
$result['count'] = count($result);
|
|
|
|
$result['count'] = $result_count;
|
|
|
|
$this->result_entries = $result;
|
|
|
|
$this->result_entries = $result;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|