summaryrefslogtreecommitdiff
path: root/program/steps
diff options
context:
space:
mode:
authoralecpl <alec@alec.pl>2011-08-01 07:58:30 +0000
committeralecpl <alec@alec.pl>2011-08-01 07:58:30 +0000
commit1cd36267a19a2b0accda66827dbdc05ec5ec77be (patch)
tree1b516af2dfa343a331d05595d44dec2fc3841c29 /program/steps
parentdc0be3378a4cf6e15ddfb0bd399ebf5d371c550f (diff)
- Improved detection of folder rename possibility and its handling
Diffstat (limited to 'program/steps')
-rw-r--r--program/steps/settings/edit_folder.inc42
1 files changed, 20 insertions, 22 deletions
diff --git a/program/steps/settings/edit_folder.inc b/program/steps/settings/edit_folder.inc
index c7f61fe87..710c3ff08 100644
--- a/program/steps/settings/edit_folder.inc
+++ b/program/steps/settings/edit_folder.inc
@@ -106,28 +106,26 @@ function rcmail_folder_form($attrib)
),
);
- if (strlen($path) || !strlen($mbox)) {
- if (!empty($options) && ($options['norename'] || $options['namespace'] != 'personal')) {
- // prevent user from moving folder
- $hidden_path = new html_hiddenfield(array('name' => '_parent', 'value' => $path));
- $form['props']['fieldsets']['location']['content']['name']['value'] .= $hidden_path->show();
- }
- else {
- $selected = isset($_POST['_parent']) ? $_POST['_parent'] : $path_id;
- $select = rcmail_mailbox_select(array(
- 'name' => '_parent',
- 'noselection' => '---',
- 'realnames' => false,
- 'maxlength' => 150,
- 'unsubscribed' => true,
- 'exceptions' => array($mbox_imap),
- ));
-
- $form['props']['fieldsets']['location']['content']['path'] = array(
- 'label' => rcube_label('parentfolder'),
- 'value' => $select->show($selected),
- );
- }
+ if (!empty($options) && ($options['norename'] || $options['protected'])) {
+ // prevent user from moving folder
+ $hidden_path = new html_hiddenfield(array('name' => '_parent', 'value' => $path));
+ $form['props']['fieldsets']['location']['content']['name']['value'] .= $hidden_path->show();
+ }
+ else {
+ $selected = isset($_POST['_parent']) ? $_POST['_parent'] : $path_id;
+ $select = rcmail_mailbox_select(array(
+ 'name' => '_parent',
+ 'noselection' => '---',
+ 'realnames' => false,
+ 'maxlength' => 150,
+ 'unsubscribed' => true,
+ 'exceptions' => array($mbox_imap),
+ ));
+
+ $form['props']['fieldsets']['location']['content']['path'] = array(
+ 'label' => rcube_label('parentfolder'),
+ 'value' => $select->show($selected),
+ );
}
// Settings