Ignore:
Timestamp:
Aug 9, 2008 4:20:59 PM (5 years ago)
Author:
alecpl <alec@…>
Branches:
master, HEAD, courier-fix, dev-browser-capabilities, pdo, release-0.6, release-0.7, release-0.8
Children:
c86e940
Parents:
06776305
Message:
  • Case insensitive contacts searching using PostgreSQL (#1485259)
File:
1 edited

Legend:

Unmodified
Added
Removed
  • program/include/rcube_contacts.php

    rf2b323e rd8d41658  
    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.