Changeset 55a8a8c in github


Ignore:
Timestamp:
Nov 10, 2011 8:11:21 AM (19 months ago)
Author:
alecpl <alec@…>
Branches:
master, HEAD, courier-fix, dev-browser-capabilities, pdo, release-0.8
Children:
bed577e
Parents:
46cdbf0
Message:
  • Fix matching check to be unicode-aware
File:
1 edited

Legend:

Unmodified
Added
Removed
  • program/steps/mail/autocomplete.inc

    rf21a04c r55a8a8c  
    5353 
    5454if (!empty($book_types) && strlen($search)) { 
    55   $contacts = array(); 
     55  $contacts  = array(); 
    5656  $books_num = count($book_types); 
     57  $search_lc = mb_strtolower($search); 
    5758 
    5859  foreach ($book_types as $id) { 
     
    7071          $contact = format_email_recipient($email, $sql_arr['name']); 
    7172          // skip entries that don't match 
    72           if ($email_cnt > 1 && stripos($contact, $search) === false) { 
     73          if ($email_cnt > 1 && strpos(mb_strtolower($contact), $search_lc) === false) { 
    7374            continue; 
    7475          } 
Note: See TracChangeset for help on using the changeset viewer.