summaryrefslogtreecommitdiff
path: root/roundcubemail/program
diff options
context:
space:
mode:
authoralec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c>2008-05-05 12:56:39 +0000
committeralec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c>2008-05-05 12:56:39 +0000
commitbea4bdad406b1c8375cc8e4359eaa7fdd61faca5 (patch)
tree5286e5247b7bdef2b1740abd820db56073b92edc /roundcubemail/program
parente9b6c5c2d72f50031a8913fe63867a5060f77c52 (diff)
- Fix management of folders with national characters in names (#1485036, #1485001)
git-svn-id: https://svn.roundcube.net/trunk@1357 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program')
-rw-r--r--roundcubemail/program/steps/settings/manage_folders.inc18
1 files changed, 14 insertions, 4 deletions
diff --git a/roundcubemail/program/steps/settings/manage_folders.inc b/roundcubemail/program/steps/settings/manage_folders.inc
index 49f9491c5..4de8c2c9c 100644
--- a/roundcubemail/program/steps/settings/manage_folders.inc
+++ b/roundcubemail/program/steps/settings/manage_folders.inc
@@ -46,8 +46,13 @@ else if ($RCMAIL->action=='unsubscribe')
else if ($RCMAIL->action=='create-folder')
{
if (!empty($_POST['_name']))
- $create = $IMAP->create_mailbox(trim(get_input_value('_name', RCUBE_INPUT_POST, FALSE, 'UTF-7')), TRUE);
-
+ {
+ $name = trim(get_input_value('_name', RCUBE_INPUT_POST, FALSE, 'UTF-7'));
+ // #1485036 (RFC3501, 5.1.3) TODO: it should be done on read not on write
+ $name = str_replace('&-', '&', $name);
+ $create = $IMAP->create_mailbox($name, TRUE);
+ }
+
if ($create && $OUTPUT->ajax_call)
{
$delimiter = $IMAP->get_hierarchy_delimiter();
@@ -65,8 +70,13 @@ else if ($RCMAIL->action=='create-folder')
else if ($RCMAIL->action=='rename-folder')
{
if (!empty($_POST['_folder_oldname']) && !empty($_POST['_folder_newname']))
- $rename = $IMAP->rename_mailbox(($oldname = get_input_value('_folder_oldname', RCUBE_INPUT_POST)), trim(get_input_value('_folder_newname', RCUBE_INPUT_POST, FALSE, 'UTF-7')));
-
+ {
+ $name = trim(get_input_value('_folder_newname', RCUBE_INPUT_POST, FALSE, 'UTF-7'));
+ // #1485036 (RFC3501, 5.1.3) TODO: it should be done on read not on write
+ $name = str_replace('&-', '&', $name);
+ $rename = $IMAP->rename_mailbox(($oldname = get_input_value('_folder_oldname', RCUBE_INPUT_POST)), $name);
+ }
+
if ($rename && $OUTPUT->ajax_call)
{
$a_mboxes = array_unique(array_merge($IMAP->list_mailboxes(), $IMAP->list_unsubscribed()));