diff options
Diffstat (limited to 'program/steps/settings/folders.inc')
-rw-r--r-- | program/steps/settings/folders.inc | 15 |
1 files changed, 14 insertions, 1 deletions
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'])); |