From 9d78c68cbf5ce86f02e8fa16814293cdfd204432 Mon Sep 17 00:00:00 2001 From: Aleksander Machniak <alec@alec.pl> Date: Wed, 29 Jul 2015 14:38:21 -0400 Subject: [PATCH] Fix so imap folder attribute comparisons are case-insensitive (#1490466) + make in_array_nocase() much faster for ASCII strings --- program/lib/Roundcube/rcube_imap.php | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/program/lib/Roundcube/rcube_imap.php b/program/lib/Roundcube/rcube_imap.php index 1421563..6725394 100644 --- a/program/lib/Roundcube/rcube_imap.php +++ b/program/lib/Roundcube/rcube_imap.php @@ -2826,7 +2826,7 @@ if (is_array($a_folders) && $name == '*' && !empty($this->conn->data['LIST'])) { foreach ($a_folders as $idx => $folder) { if (($opts = $this->conn->data['LIST'][$folder]) - && in_array('\\NonExistent', $opts) + && in_array_nocase('\\NonExistent', $opts) ) { $this->conn->unsubscribe($folder); unset($a_folders[$idx]); @@ -3349,7 +3349,7 @@ if ($subscription) { // It's possible we already called LIST command, check LIST data if (!empty($this->conn->data['LIST']) && !empty($this->conn->data['LIST'][$folder]) - && in_array('\\Subscribed', $this->conn->data['LIST'][$folder]) + && in_array_nocase('\\Subscribed', $this->conn->data['LIST'][$folder]) ) { $a_folders = array($folder); } -- Gitblit v1.9.1