summaryrefslogtreecommitdiff
path: root/program/include/rcube_imap.php
diff options
context:
space:
mode:
authoralecpl <alec@alec.pl>2011-07-06 07:50:34 +0000
committeralecpl <alec@alec.pl>2011-07-06 07:50:34 +0000
commit9220169bf1f25aab8ef82cb6bf8d830ac905f036 (patch)
tree6764eeaa5a8d9d7791b1be882572ba6c9e85f05c /program/include/rcube_imap.php
parent1564d4ef79929c8ecaf4cf057d2fca4a9aea0df0 (diff)
- Fix handling of other users namespace roots
Diffstat (limited to 'program/include/rcube_imap.php')
-rw-r--r--program/include/rcube_imap.php15
1 files changed, 14 insertions, 1 deletions
diff --git a/program/include/rcube_imap.php b/program/include/rcube_imap.php
index 411be5202..710a434f2 100644
--- a/program/include/rcube_imap.php
+++ b/program/include/rcube_imap.php
@@ -3508,12 +3508,25 @@ class rcube_imap
foreach ($ns as $item) {
if ($item[0] === $mbox) {
$options['is_root'] = true;
- break;
+ break 2;
}
}
}
}
}
+ // check if the folder is other user virtual-root
+ if (!$options['is_root'] && !empty($namespace) && !empty($namespace['other'])) {
+ $parts = explode($this->delimiter, $mailbox);
+ if (count($parts) == 2) {
+ $mbox = $parts[0] . $this->delimiter;
+ foreach ($namespace['other'] as $item) {
+ if ($item[0] === $mbox) {
+ $options['is_root'] = true;
+ break;
+ }
+ }
+ }
+ }
$options['name'] = $mailbox;
$options['options'] = $this->mailbox_options($mailbox, true);