summaryrefslogtreecommitdiff
path: root/program
diff options
context:
space:
mode:
authoralecpl <alec@alec.pl>2010-12-27 11:48:50 +0000
committeralecpl <alec@alec.pl>2010-12-27 11:48:50 +0000
commit1c7b94b52e025bac64f610dd5e482548db2451bc (patch)
tree8423e56a96ea45663683555843f9e4907d7ccb7f /program
parentf811dab109ea0d0809b12f45642f43fb1be33585 (diff)
- Fix namespaces handling (#1487649)
Diffstat (limited to 'program')
-rw-r--r--program/include/rcube_imap.php18
1 files changed, 6 insertions, 12 deletions
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