summaryrefslogtreecommitdiff
path: root/roundcubemail/program/steps/settings
diff options
context:
space:
mode:
authoralec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c>2011-08-18 12:32:35 +0000
committeralec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c>2011-08-18 12:32:35 +0000
commitc976ca1b92d878b07a7926aed4fefc98bb2f7462 (patch)
tree88d5432cdbeeb12f0b0ceeac58b98e00b3fe16a2 /roundcubemail/program/steps/settings
parent617ff0a7ed84e1b0b47a434212a78514970adbe0 (diff)
- Disable subscription on virtual shared folders
git-svn-id: https://svn.roundcube.net/trunk@5087 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program/steps/settings')
-rw-r--r--roundcubemail/program/steps/settings/folders.inc10
1 files changed, 10 insertions, 0 deletions
diff --git a/roundcubemail/program/steps/settings/folders.inc b/roundcubemail/program/steps/settings/folders.inc
index ccf8eebb2..1d5df46e9 100644
--- a/roundcubemail/program/steps/settings/folders.inc
+++ b/roundcubemail/program/steps/settings/folders.inc
@@ -314,6 +314,16 @@ function rcube_subscription_form($attrib)
}
}
}
+ // check if the folder is shared, then disable subscription option on it
+ if (!$disabled && $folder['virtual'] && !empty($namespace)) {
+ $tmp_ns = array_merge((array)$namespace['other'], (array)$namespace['shared']);
+ foreach ($tmp_ns as $item) {
+ if (strpos($folder['id'], $item[0]) === 0) {
+ $disabled = true;
+ break;
+ }
+ }
+ }
$table->add_row(array('id' => 'rcmrow'.$idx, 'class' => join(' ', $classes),
'foldername' => $folder['id']));