summaryrefslogtreecommitdiff
path: root/program/lib/Roundcube/rcube_ldap.php
diff options
context:
space:
mode:
authorAleksander Machniak <alec@alec.pl>2013-01-07 14:21:25 +0100
committerAleksander Machniak <alec@alec.pl>2013-01-07 14:21:25 +0100
commit83f7077ec930952cdc9cfc8982b80cd4dad06b5f (patch)
tree8bd24c93de5d1dbc8d356aa29aea0c73cd518619 /program/lib/Roundcube/rcube_ldap.php
parenta5b8ef99d4e26bdb00e9b74221f107767a084a6e (diff)
Fix searching by date in address book (#1488888)
Diffstat (limited to 'program/lib/Roundcube/rcube_ldap.php')
-rw-r--r--program/lib/Roundcube/rcube_ldap.php17
1 files changed, 2 insertions, 15 deletions
diff --git a/program/lib/Roundcube/rcube_ldap.php b/program/lib/Roundcube/rcube_ldap.php
index d4bc669fd..700c6f60c 100644
--- a/program/lib/Roundcube/rcube_ldap.php
+++ b/program/lib/Roundcube/rcube_ldap.php
@@ -794,27 +794,14 @@ class rcube_ldap extends rcube_addressbook
$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);
+ $search = mb_strtolower($value);
$entries = ldap_get_entries($this->conn, $this->ldap_result);
for ($i = 0; $i < $entries['count']; $i++) {
$rec = $this->_ldap2result($entries[$i]);
foreach ($fields as $f) {
foreach ((array)$rec[$f] as $val) {
- $val = mb_strtolower($val);
- switch ($mode) {
- case 1:
- $got = ($val == $search);
- break;
- case 2:
- $got = ($search == substr($val, 0, strlen($search)));
- break;
- default:
- $got = (strpos($val, $search) !== false);
- break;
- }
-
- if ($got) {
+ if ($this->compare_search_value($f, $val, $search, $mode)) {
$this->result->add($rec);
$this->result->count++;
break 2;