diff options
author | alecpl <alec@alec.pl> | 2012-02-13 14:26:46 +0000 |
---|---|---|
committer | alecpl <alec@alec.pl> | 2012-02-13 14:26:46 +0000 |
commit | 18a3dcaf56aa8d650db8c791cdba90fcd38468ab (patch) | |
tree | 683d3369fff543f4e54a7994e2c04b1d77c7fc84 /program/steps/settings/edit_folder.inc | |
parent | 06c990ead24edee69f07912f8169a0422c411422 (diff) |
- Fix issue with folder creation under INBOX. namespace (#1488349)
Diffstat (limited to 'program/steps/settings/edit_folder.inc')
-rw-r--r-- | program/steps/settings/edit_folder.inc | 11 |
1 files changed, 10 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( |