summaryrefslogtreecommitdiff
path: root/roundcubemail
diff options
context:
space:
mode:
authoralec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c>2011-11-10 13:11:21 +0000
committeralec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c>2011-11-10 13:11:21 +0000
commite8cc92fa162006b331c0b8532a707709183f2efc (patch)
tree1eec7228676b3b20fad1ebc29ad455a663d348c5 /roundcubemail
parentae1e4313e2e028c5df05bfe947a07fc36dcb1474 (diff)
- Fix matching check to be unicode-aware
git-svn-id: https://svn.roundcube.net/trunk@5410 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail')
-rw-r--r--roundcubemail/program/steps/mail/autocomplete.inc5
1 files changed, 3 insertions, 2 deletions
diff --git a/roundcubemail/program/steps/mail/autocomplete.inc b/roundcubemail/program/steps/mail/autocomplete.inc
index c2df0b79c..8ccfaaa6f 100644
--- a/roundcubemail/program/steps/mail/autocomplete.inc
+++ b/roundcubemail/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