From 19a61851ae7bc9492504c4884db8a53afa5d06c5 Mon Sep 17 00:00:00 2001 From: Aleksander Machniak <alec@alec.pl> Date: Wed, 29 Jul 2015 14:39:07 -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 d17b33f..6f58fdc 100644 --- a/program/lib/Roundcube/rcube_imap.php +++ b/program/lib/Roundcube/rcube_imap.php @@ -2871,7 +2871,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]); @@ -3408,7 +3408,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