diff options
author | alecpl <alec@alec.pl> | 2011-08-01 07:58:30 +0000 |
---|---|---|
committer | alecpl <alec@alec.pl> | 2011-08-01 07:58:30 +0000 |
commit | 1cd36267a19a2b0accda66827dbdc05ec5ec77be (patch) | |
tree | 1b516af2dfa343a331d05595d44dec2fc3841c29 /program/include/rcube_imap.php | |
parent | dc0be3378a4cf6e15ddfb0bd399ebf5d371c550f (diff) |
- Improved detection of folder rename possibility and its handling
Diffstat (limited to 'program/include/rcube_imap.php')
-rw-r--r-- | program/include/rcube_imap.php | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/program/include/rcube_imap.php b/program/include/rcube_imap.php index f809288eb..3ba058988 100644 --- a/program/include/rcube_imap.php +++ b/program/include/rcube_imap.php @@ -3535,6 +3535,7 @@ class rcube_imap $options['rights'] = $acl && !$options['is_root'] ? (array)$this->my_rights($mailbox) : array(); $options['special'] = in_array($mailbox, $this->default_folders); + // Set 'noselect' and 'norename' flags if (is_array($options['options'])) { foreach ($options['options'] as $opt) { $opt = strtolower($opt); @@ -3548,12 +3549,14 @@ class rcube_imap } if (!empty($options['rights'])) { - $options['norename'] = !in_array('x', $options['rights']) && - (!in_array('c', $options['rights']) || !in_array('d', $options['rights'])); + $options['norename'] = !in_array('x', $options['rights']); if (!$options['noselect']) { $options['noselect'] = !in_array('r', $options['rights']); } } + else { + $options['norename'] = $options['is_root'] || $options['namespace'] != 'personal'; + } return $options; } |