diff options
Diffstat (limited to 'program/steps')
-rw-r--r-- | program/steps/settings/edit_folder.inc | 11 | ||||
-rw-r--r-- | program/steps/settings/folders.inc | 1 |
2 files changed, 11 insertions, 1 deletions
diff --git a/program/steps/settings/edit_folder.inc b/program/steps/settings/edit_folder.inc index 2c69c74d0..644c86e2c 100644 --- a/program/steps/settings/edit_folder.inc +++ b/program/steps/settings/edit_folder.inc @@ -115,6 +115,15 @@ function rcmail_folder_form($attrib) } else { $selected = isset($_POST['_parent']) ? $_POST['_parent'] : $path_id; + $exceptions = array($mbox_imap); + + // Exclude 'prefix' namespace from parent folders list (#1488349) + // If INBOX. namespace exists, folders created as INBOX subfolders + // will be listed at the same level - selecting INBOX as a parent does nothing + if ($prefix = $storage->get_namespace('prefix')) { + $exceptions[] = substr($prefix, 0, -1); + } + $select = rcmail_mailbox_select(array( 'name' => '_parent', 'noselection' => '---', @@ -122,7 +131,7 @@ function rcmail_folder_form($attrib) 'maxlength' => 150, 'unsubscribed' => true, 'skip_noinferiors' => true, - 'exceptions' => array($mbox_imap), + 'exceptions' => $exceptions, )); $form['props']['fieldsets']['location']['content']['path'] = array( diff --git a/program/steps/settings/folders.inc b/program/steps/settings/folders.inc index d82d8366b..3802577eb 100644 --- a/program/steps/settings/folders.inc +++ b/program/steps/settings/folders.inc @@ -415,6 +415,7 @@ function rcmail_rename_folder($oldname, $newname) $OUTPUT->set_pagetitle(rcube_label('folders')); $OUTPUT->include_script('list.js'); $OUTPUT->set_env('quota', $STORAGE->get_capability('QUOTA')); +$OUTPUT->set_env('prefix_ns', $STORAGE->get_namespace('prefix')); // add some labels to client $OUTPUT->add_label('deletefolderconfirm', 'purgefolderconfirm', 'folderdeleting', |