From 9220169bf1f25aab8ef82cb6bf8d830ac905f036 Mon Sep 17 00:00:00 2001 From: alecpl <alec@alec.pl> Date: Wed, 06 Jul 2011 03:50:34 -0400 Subject: [PATCH] - Fix handling of other users namespace roots --- program/include/rcube_imap.php | 15 ++++++++++++++- 1 files changed, 14 insertions(+), 1 deletions(-) diff --git a/program/include/rcube_imap.php b/program/include/rcube_imap.php index 411be52..710a434 100644 --- a/program/include/rcube_imap.php +++ b/program/include/rcube_imap.php @@ -3508,12 +3508,25 @@ 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); -- Gitblit v1.9.1