diff options
| author | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2011-05-05 12:46:54 +0000 |
|---|---|---|
| committer | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2011-05-05 12:46:54 +0000 |
| commit | 512c19b2da21a7560fb924b67f47888506295b9d (patch) | |
| tree | 491c878e59528a130c8c0266a2bca4b165ef2022 /roundcubemail/program/steps/settings/edit_folder.inc | |
| parent | 865e3f5f3c4aa8b78451deb7fc27b16e3e47a438 (diff) | |
- Fix problems with subfolders of INBOX folder on some IMAP servers (#1487725)
- Fix handling of folders that doesn't belong to any namespace (#1487637)
git-svn-id: https://svn.roundcube.net/trunk@4733 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program/steps/settings/edit_folder.inc')
| -rw-r--r-- | roundcubemail/program/steps/settings/edit_folder.inc | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/roundcubemail/program/steps/settings/edit_folder.inc b/roundcubemail/program/steps/settings/edit_folder.inc index 34dc064b5..c57ec69d7 100644 --- a/roundcubemail/program/steps/settings/edit_folder.inc +++ b/roundcubemail/program/steps/settings/edit_folder.inc @@ -54,6 +54,20 @@ function rcube_folder_form($attrib) else { $options = array(); $path = $parent_imap; + + // allow creating subfolders of INBOX folder + if ($path == 'INBOX') { + $path = $RCMAIL->imap->mod_mailbox($path, 'in'); + } + } + + // remove personal namespace prefix + if (strlen($path)) { + $path_id = $path; + $path = $RCMAIL->imap->mod_mailbox($path.$delimiter); + if ($path[strlen($path)-1] == $delimiter) { + $path = substr($path, 0, -1); + } } $form = array(); @@ -93,15 +107,15 @@ function rcube_folder_form($attrib) ); if (strlen($path)) { - if ($options['norename'] || $options['namespace'] != 'personal') { + 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 { $radio1 = new html_radiobutton(array('name' => '_parent', 'value' => '')); - $radio2 = new html_radiobutton(array('name' => '_parent', 'value' => $path)); - $selected = isset($_POST['_parent']) ? $_POST['_parent'] : $path; + $radio2 = new html_radiobutton(array('name' => '_parent', 'value' => $path_id)); + $selected = isset($_POST['_parent']) ? $_POST['_parent'] : $path_id; $html_path = str_replace($delimiter, ' » ', rcmail_localize_folderpath($path)); |
