summaryrefslogtreecommitdiff
path: root/program/include/rcube_contacts.php
diff options
context:
space:
mode:
authoralecpl <alec@alec.pl>2008-08-09 20:20:59 +0000
committeralecpl <alec@alec.pl>2008-08-09 20:20:59 +0000
commitd8d41658d3fb87c71c3e30825003f827f4ffbdae (patch)
tree75f62e9e697d54685802eee6bfa5d9cb968ac4b2 /program/include/rcube_contacts.php
parent06776305af9b08876533c46e8493c2759d66f747 (diff)
- Case insensitive contacts searching using PostgreSQL (#1485259)
Diffstat (limited to 'program/include/rcube_contacts.php')
-rw-r--r--program/include/rcube_contacts.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/program/include/rcube_contacts.php b/program/include/rcube_contacts.php
index 913f04fd3..0c0f932fc 100644
--- a/program/include/rcube_contacts.php
+++ b/program/include/rcube_contacts.php
@@ -196,12 +196,12 @@ class rcube_contacts
if ($col == 'ID' || $col == $this->primary_key)
{
$ids = !is_array($value) ? split(',', $value) : $value;
- $add_where[] = $this->primary_key." IN (".join(',', $ids).")";
+ $add_where[] = $this->primary_key.' IN ('.join(',', $ids).')';
}
else if ($strict)
- $add_where[] = $this->db->quoteIdentifier($col)."=".$this->db->quote($value);
+ $add_where[] = $this->db->quoteIdentifier($col).'='.$this->db->quote($value);
else
- $add_where[] = $this->db->quoteIdentifier($col)." LIKE ".$this->db->quote(strlen($value)>2 ? "%$value%" : "$value%");
+ $add_where[] = $this->db->ilike($col, '%'.$value.'%');
}
if (!empty($add_where))