summaryrefslogtreecommitdiff
path: root/program/steps
diff options
context:
space:
mode:
authoralecpl <alec@alec.pl>2011-11-10 13:11:21 +0000
committeralecpl <alec@alec.pl>2011-11-10 13:11:21 +0000
commit55a8a8cc2524b0c0c72f1cf01933e6a6c5afd0aa (patch)
treeb14ce9b094a62e8f2a84a6fe908d4eafe72555ec /program/steps
parent46cdbf074e59a33fafc8a71406dbb9984a48bc95 (diff)
- Fix matching check to be unicode-aware
Diffstat (limited to 'program/steps')
-rw-r--r--program/steps/mail/autocomplete.inc5
1 files changed, 3 insertions, 2 deletions
diff --git a/program/steps/mail/autocomplete.inc b/program/steps/mail/autocomplete.inc
index c2df0b79c..8ccfaaa6f 100644
--- a/program/steps/mail/autocomplete.inc
+++ b/program/steps/mail/autocomplete.inc
@@ -52,8 +52,9 @@ else
$book_types = (array) $RCMAIL->config->get('autocomplete_addressbooks', 'sql');
if (!empty($book_types) && strlen($search)) {
- $contacts = array();
+ $contacts = array();
$books_num = count($book_types);
+ $search_lc = mb_strtolower($search);
foreach ($book_types as $id) {
$abook = $RCMAIL->get_address_book($id);
@@ -69,7 +70,7 @@ if (!empty($book_types) && strlen($search)) {
continue;
$contact = format_email_recipient($email, $sql_arr['name']);
// skip entries that don't match
- if ($email_cnt > 1 && stripos($contact, $search) === false) {
+ if ($email_cnt > 1 && strpos(mb_strtolower($contact), $search_lc) === false) {
continue;
}
// skip duplicates