Ignore:
Timestamp:
Aug 9, 2008 4:20:59 PM (5 years ago)
Author:
alec
Message:
  • Case insensitive contacts searching using PostgreSQL (#1485259)
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/roundcubemail/program/include/rcube_contacts.php

    r1387 r1637  
    197197      { 
    198198        $ids = !is_array($value) ? split(',', $value) : $value; 
    199         $add_where[] = $this->primary_key." IN (".join(',', $ids).")"; 
     199        $add_where[] = $this->primary_key.' IN ('.join(',', $ids).')'; 
    200200      } 
    201201      else if ($strict) 
    202         $add_where[] = $this->db->quoteIdentifier($col)."=".$this->db->quote($value); 
     202        $add_where[] = $this->db->quoteIdentifier($col).'='.$this->db->quote($value); 
    203203      else 
    204         $add_where[] = $this->db->quoteIdentifier($col)." LIKE ".$this->db->quote(strlen($value)>2 ? "%$value%" : "$value%"); 
     204        $add_where[] = $this->db->ilike($col, '%'.$value.'%'); 
    205205    } 
    206206     
Note: See TracChangeset for help on using the changeset viewer.