diff options
| author | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2011-06-03 13:02:30 +0000 |
|---|---|---|
| committer | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2011-06-03 13:02:30 +0000 |
| commit | 7acb72df2b8b28c054d836bf14804130637e39f6 (patch) | |
| tree | 109d8a28767cbe40da6e12cdf81fb458fea3a7de /roundcubemail/program | |
| parent | e5da6d4ecd6bb004e8fdfc79139779df1a0cd8e2 (diff) | |
- Small fix for advanced searching
git-svn-id: https://svn.roundcube.net/trunk@4838 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program')
| -rw-r--r-- | roundcubemail/program/include/rcube_contacts.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/roundcubemail/program/include/rcube_contacts.php b/roundcubemail/program/include/rcube_contacts.php index 6af438216..38a1f3742 100644 --- a/roundcubemail/program/include/rcube_contacts.php +++ b/roundcubemail/program/include/rcube_contacts.php @@ -321,7 +321,7 @@ class rcube_contacts extends rcube_addressbook $this->list_records(null, $i, true); while ($row = $this->result->next()) { $id = $row[$this->primary_key]; - $found = 0; + $found = array(); foreach (preg_grep($regexp, array_keys($row)) as $col) { $pos = strpos($col, ':'); $colname = $pos ? substr($col, 0, $pos) : $col; @@ -333,13 +333,13 @@ class rcube_contacts extends rcube_addressbook } $value = mb_strtolower($value); if (($strict && $value == $search) || (!$strict && strpos($value, $search) !== false)) { - $found++; + $found[$colname] = true; break; } } } // all fields match - if ($found >= $scnt) { + if (count($found) >= $scnt) { $ids[] = $id; } } |
