summaryrefslogtreecommitdiff
path: root/program/steps/settings/save_folder.inc
diff options
context:
space:
mode:
authoralecpl <alec@alec.pl>2011-02-28 17:59:13 +0000
committeralecpl <alec@alec.pl>2011-02-28 17:59:13 +0000
commitbbce3edd61d05e0aa0bade7364315f7840549d9e (patch)
tree508f91a4f17288b0d71e3b653d13209889205f6e /program/steps/settings/save_folder.inc
parent29c54229cfbc104930e7743cecc212f53aed8a15 (diff)
- Add simple ACL rights/namespace handling in folder manager (display folder's namespace, modify edit form fields according to MYRIGHTS)
Diffstat (limited to 'program/steps/settings/save_folder.inc')
-rw-r--r--program/steps/settings/save_folder.inc9
1 files changed, 3 insertions, 6 deletions
diff --git a/program/steps/settings/save_folder.inc b/program/steps/settings/save_folder.inc
index d8ba87b5b..70aad6d82 100644
--- a/program/steps/settings/save_folder.inc
+++ b/program/steps/settings/save_folder.inc
@@ -34,12 +34,10 @@ $old_imap = rcube_charset_convert($old, RCMAIL_CHARSET, 'UTF7-IMAP');
// $path is in UTF7-IMAP already
$delimiter = $IMAP->get_hierarchy_delimiter();
-$special = (strlen($old_imap) && in_array($old_imap, (array) $RCMAIL->config->get('default_imap_folders')));
-$protected = ($special && $RCMAIL->config->get('protect_default_folders'));
-
+$options = strlen($old_imap) ? rcube_folder_options($old_imap) : array();
// Folder name checks
-if ($protected) {
+if ($options['protected'] || $options['norename']) {
}
else if (!strlen($name)) {
$error = rcube_label('cannotbeempty');
@@ -61,7 +59,7 @@ if ($error) {
$OUTPUT->command('display_message', $error, 'error');
}
else {
- if ($protected) {
+ if ($options['protected'] || $options['norename']) {
$name_imap = $old_imap;
}
else if (strlen($path)) {
@@ -141,7 +139,6 @@ else if (!$error) {
// In case of name change update names of childrens in settings
if ($rename) {
- $delimiter = $RCMAIL->imap->get_hierarchy_delimiter();
$oldprefix = '/^' . preg_quote($folder['oldname'] . $delimiter, '/') . '/';
foreach ($a_threaded as $key => $val) {
if ($key == $folder['oldname']) {