From 72fa1933350bb88220f3b2fc41607b48223a83bb Mon Sep 17 00:00:00 2001 From: alecpl Date: Thu, 18 Aug 2011 12:32:35 +0000 Subject: - Disable subscription on virtual shared folders --- program/steps/settings/folders.inc | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'program/steps/settings/folders.inc') 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'])); -- cgit v1.2.3