summaryrefslogtreecommitdiff
path: root/program/steps/settings/folders.inc
diff options
context:
space:
mode:
authoralecpl <alec@alec.pl>2011-08-18 12:32:35 +0000
committeralecpl <alec@alec.pl>2011-08-18 12:32:35 +0000
commit72fa1933350bb88220f3b2fc41607b48223a83bb (patch)
tree89f9ba821910eb37390df8e3fade2cff0af97227 /program/steps/settings/folders.inc
parent0d16eb7ba53aa25c81329dc28f7cb5ade2497961 (diff)
- Disable subscription on virtual shared folders
Diffstat (limited to 'program/steps/settings/folders.inc')
-rw-r--r--program/steps/settings/folders.inc10
1 files changed, 10 insertions, 0 deletions
diff --git a/program/steps/settings/folders.inc b/program/steps/settings/folders.inc
index ccf8eebb2..1d5df46e9 100644
--- a/program/steps/settings/folders.inc
+++ b/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']));