summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CHANGELOG1
-rw-r--r--program/include/rcube_imap.php18
2 files changed, 7 insertions, 12 deletions
diff --git a/CHANGELOG b/CHANGELOG
index 320ec309b..722b8fec9 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -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