summaryrefslogtreecommitdiff
path: root/roundcubemail/program/include/rcube_contacts.php
diff options
context:
space:
mode:
authoralec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c>2011-06-01 13:44:51 +0000
committeralec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c>2011-06-01 13:44:51 +0000
commit4d19f0bc1dc11672b9aaf13d5c4c32207fd727e5 (patch)
treea7e53f64b0828a6c8cd7df6e7dc0e62db6a5bab2 /roundcubemail/program/include/rcube_contacts.php
parentbb76e4ef22e71e33674c19c97dd5976f42f3200f (diff)
- Add popup with basic fields selection for addressbook search
git-svn-id: https://svn.roundcube.net/trunk@4823 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program/include/rcube_contacts.php')
-rw-r--r--roundcubemail/program/include/rcube_contacts.php13
1 files changed, 7 insertions, 6 deletions
diff --git a/roundcubemail/program/include/rcube_contacts.php b/roundcubemail/program/include/rcube_contacts.php
index 687b4b111..7c142f545 100644
--- a/roundcubemail/program/include/rcube_contacts.php
+++ b/roundcubemail/program/include/rcube_contacts.php
@@ -192,7 +192,7 @@ class rcube_contacts extends rcube_addressbook
// determine whether we have to parse the vcard or if only db cols are requested
$read_vcard = !$cols || count(array_intersect($cols, $this->table_cols)) < count($cols);
-
+
while ($sql_result && ($sql_arr = $this->db->fetch_assoc($sql_result))) {
$sql_arr['ID'] = $sql_arr[$this->primary_key];
@@ -255,17 +255,18 @@ class rcube_contacts extends rcube_addressbook
$ids = $this->db->array2list($ids, 'integer');
$where[] = 'c.' . $this->primary_key.' IN ('.$ids.')';
}
- else if ($strict) {
- $where[] = $this->db->quoteIdentifier($col).' = '.$this->db->quote($value);
- }
else if ($col == '*') {
$words = array();
foreach(explode(" ", self::normalize_string($value)) as $word)
$words[] = $this->db->ilike('words', '%'.$word.'%');
$where[] = '(' . join(' AND ', $words) . ')';
- }
- else
+ }
+ else if ($strict) {
+ $where[] = $this->db->quoteIdentifier($col).' = '.$this->db->quote($value);
+ }
+ else if (in_array($col, $this->table_cols)) {
$where[] = $this->db->ilike($col, '%'.$value.'%');
+ }
}
foreach ($required as $col) {