From 7f639467194da6d6a4059d75fb2307ffe1201ab5 Mon Sep 17 00:00:00 2001 From: alecpl <alec@alec.pl> Date: Mon, 20 Oct 2008 05:18:52 -0400 Subject: [PATCH] - #1485499: make email address comparision case insensitive - support multibyte characters in in_array_nocase() --- program/include/rcube_shared.inc | 2 +- program/steps/mail/compose.inc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/program/include/rcube_shared.inc b/program/include/rcube_shared.inc index e740aea..af5eb1f 100644 --- a/program/include/rcube_shared.inc +++ b/program/include/rcube_shared.inc @@ -210,7 +210,7 @@ function in_array_nocase($needle, $haystack) { foreach ($haystack as $value) - if (strtolower($needle)===strtolower($value)) + if (rc_strtolower($needle)===rc_strtolower($value)) return true; return false; diff --git a/program/steps/mail/compose.inc b/program/steps/mail/compose.inc index efc9790..df6f1ff 100644 --- a/program/steps/mail/compose.inc +++ b/program/steps/mail/compose.inc @@ -219,7 +219,7 @@ if (!empty($addr_part['mailto']) && !in_array($addr_part['mailto'], $sa_recipients) && (!$MESSAGE->compose_from - || !in_array($addr_part['mailto'], $MESSAGE->compose_from) + || !in_array_nocase($addr_part['mailto'], $MESSAGE->compose_from) || count($to_addresses)==1)) // allow reply to yourself { $fvalue .= (strlen($fvalue) ? ', ':'').$addr_part['string']; -- Gitblit v1.9.1