summaryrefslogtreecommitdiff
path: root/program/steps
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/steps
parent1564d4ef79929c8ecaf4cf057d2fca4a9aea0df0 (diff)
- Fix handling of other users namespace roots
Diffstat (limited to 'program/steps')
-rw-r--r--program/steps/settings/edit_folder.inc2
-rw-r--r--program/steps/settings/folders.inc15
2 files changed, 15 insertions, 2 deletions
diff --git a/program/steps/settings/edit_folder.inc b/program/steps/settings/edit_folder.inc
index 093b8dfac..440a11999 100644
--- a/program/steps/settings/edit_folder.inc
+++ b/program/steps/settings/edit_folder.inc
@@ -79,7 +79,7 @@ function rcmail_folder_form($attrib)
// Location (name)
if ($options['protected']) {
- $foldername = Q(rcmail_localize_foldername($mbox_imap));
+ $foldername = Q(str_replace($delimiter, ' &raquo; ', rcmail_localize_folderpath($mbox_imap)));
}
else if ($options['norename']) {
$foldername = Q($folder);
diff --git a/program/steps/settings/folders.inc b/program/steps/settings/folders.inc
index ed1fb79bf..239413f1a 100644
--- a/program/steps/settings/folders.inc
+++ b/program/steps/settings/folders.inc
@@ -280,11 +280,24 @@ function rcube_subscription_form($attrib)
foreach ($ns as $item) {
if ($item[0] === $fname) {
$disabled = true;
- break;
+ break 2;
}
}
}
}
+ // check if the folder is an other users virtual-root folder, then disable subscription option on it
+ if (!$disabled && $folder['virtual'] && $folder['level'] == 1
+ && !empty($namespace) && !empty($namespace['other'])
+ ) {
+ $parts = explode($delimiter, $folder['id']);
+ $fname = $parts[0] . $delimiter;
+ foreach ($namespace['other'] as $item) {
+ if ($item[0] === $fname) {
+ $disabled = true;
+ break;
+ }
+ }
+ }
$table->add_row(array('id' => 'rcmrow'.$idx, 'class' => join(' ', $classes),
'foldername' => $folder['id']));