diff options
author | alecpl <alec@alec.pl> | 2010-12-27 11:48:50 +0000 |
---|---|---|
committer | alecpl <alec@alec.pl> | 2010-12-27 11:48:50 +0000 |
commit | 1c7b94b52e025bac64f610dd5e482548db2451bc (patch) | |
tree | 8423e56a96ea45663683555843f9e4907d7ccb7f | |
parent | f811dab109ea0d0809b12f45642f43fb1be33585 (diff) |
- Fix namespaces handling (#1487649)
-rw-r--r-- | CHANGELOG | 1 | ||||
-rw-r--r-- | program/include/rcube_imap.php | 18 |
2 files changed, 7 insertions, 12 deletions
@@ -2,6 +2,7 @@ CHANGELOG Roundcube Webmail =========================== - Show the same message only once (#1487641) +- Fix namespaces handling (#1487649) RELEASE 0.5-RC -------------- diff --git a/program/include/rcube_imap.php b/program/include/rcube_imap.php index 02efaff12..5e4d22824 100644 --- a/program/include/rcube_imap.php +++ b/program/include/rcube_imap.php @@ -3318,28 +3318,22 @@ class rcube_imap // If folder contains namespace prefix, don't modify it if (is_array($this->namespace['shared'])) { foreach ($this->namespace['shared'] as $ns) { - foreach ((array)$ns as $root) { - if ($root[0] && strpos($mbox_name, $root[0]) === 0) { - return $mbox_name; - } + if ($ns[0] && strpos($mbox_name, $ns[0]) === 0) { + return $mbox_name; } } } if (is_array($this->namespace['other'])) { foreach ($this->namespace['other'] as $ns) { - foreach ((array)$ns as $root) { - if ($root[0] && strpos($mbox_name, $root[0]) === 0) { - return $mbox_name; - } + if ($ns[0] && strpos($mbox_name, $ns[0]) === 0) { + return $mbox_name; } } } if (is_array($this->namespace['personal'])) { foreach ($this->namespace['personal'] as $ns) { - foreach ((array)$ns as $root) { - if ($root[0] && strpos($mbox_name, $root[0]) === 0) { - return $mbox_name; - } + if ($ns[0] && strpos($mbox_name, $ns[0]) === 0) { + return $mbox_name; } } // Add prefix if first personal namespace is non-empty |