summaryrefslogtreecommitdiff
path: root/program
diff options
context:
space:
mode:
authorAleksander Machniak <alec@alec.pl>2013-11-07 15:00:54 +0100
committerAleksander Machniak <alec@alec.pl>2013-11-07 15:00:54 +0100
commit96247867f29d01e7e8363259b6f666dc67e7bb72 (patch)
treeb3c6e6ab290e6826924999ce461b0cab1e10bfce /program
parentd1a17029a3eff704fd00c0f1f1d219869944fcc9 (diff)
Fix operations on folders with trailing spaces in name (#1489419)
Diffstat (limited to 'program')
-rw-r--r--program/steps/settings/edit_folder.inc4
-rw-r--r--program/steps/settings/folders.inc4
-rw-r--r--program/steps/settings/save_folder.inc6
3 files changed, 7 insertions, 7 deletions
diff --git a/program/steps/settings/edit_folder.inc b/program/steps/settings/edit_folder.inc
index f19e2177b..7f2a10ebc 100644
--- a/program/steps/settings/edit_folder.inc
+++ b/program/steps/settings/edit_folder.inc
@@ -28,11 +28,11 @@ function rcmail_folder_form($attrib)
$storage = $RCMAIL->get_storage();
// edited folder name (empty in create-folder mode)
- $mbox = trim(get_input_value('_mbox', RCUBE_INPUT_GPC, true));
+ $mbox = get_input_value('_mbox', RCUBE_INPUT_GPC, true);
$mbox_imap = rcube_charset_convert($mbox, RCMAIL_CHARSET, 'UTF7-IMAP');
// predefined path for new folder
- $parent = trim(get_input_value('_path', RCUBE_INPUT_GPC, true));
+ $parent = get_input_value('_path', RCUBE_INPUT_GPC, true);
$parent_imap = rcube_charset_convert($parent, RCMAIL_CHARSET, 'UTF7-IMAP');
$threading_supported = $storage->get_capability('THREAD');
diff --git a/program/steps/settings/folders.inc b/program/steps/settings/folders.inc
index 64af18d62..44482e938 100644
--- a/program/steps/settings/folders.inc
+++ b/program/steps/settings/folders.inc
@@ -109,7 +109,7 @@ else if ($RCMAIL->action == 'delete-folder')
else if ($RCMAIL->action == 'rename-folder')
{
$name_utf8 = trim(get_input_value('_folder_newname', RCUBE_INPUT_POST, true));
- $oldname_utf8 = trim(get_input_value('_folder_oldname', RCUBE_INPUT_POST, true));
+ $oldname_utf8 = get_input_value('_folder_oldname', RCUBE_INPUT_POST, true);
if (strlen($name_utf8) && strlen($oldname_utf8)) {
$name = rcube_charset_convert($name_utf8, RCMAIL_CHARSET, 'UTF7-IMAP');
@@ -167,7 +167,7 @@ else if ($RCMAIL->action == 'purge')
// get mailbox size
else if ($RCMAIL->action == 'folder-size')
{
- $name = trim(get_input_value('_mbox', RCUBE_INPUT_POST, true));
+ $name = get_input_value('_mbox', RCUBE_INPUT_POST, true);
$size = $STORAGE->folder_size($name);
diff --git a/program/steps/settings/save_folder.inc b/program/steps/settings/save_folder.inc
index 877b0fbbe..efb096d57 100644
--- a/program/steps/settings/save_folder.inc
+++ b/program/steps/settings/save_folder.inc
@@ -5,7 +5,7 @@
| program/steps/settings/save_folder.inc |
| |
| This file is part of the Roundcube Webmail client |
- | Copyright (C) 2005-2012, The Roundcube Dev Team |
+ | Copyright (C) 2005-2013, The Roundcube Dev Team |
| |
| Licensed under the GNU General Public License version 3 or |
| any later version with exceptions for skins & plugins. |
@@ -26,8 +26,8 @@ $STORAGE = $RCMAIL->get_storage();
$name = trim(get_input_value('_name', RCUBE_INPUT_POST, true));
-$old = trim(get_input_value('_mbox', RCUBE_INPUT_POST, true));
-$path = trim(get_input_value('_parent', RCUBE_INPUT_POST, true));
+$old = get_input_value('_mbox', RCUBE_INPUT_POST, true);
+$path = get_input_value('_parent', RCUBE_INPUT_POST, true);
$name_imap = rcube_charset_convert($name, RCMAIL_CHARSET, 'UTF7-IMAP');
$old_imap = rcube_charset_convert($old, RCMAIL_CHARSET, 'UTF7-IMAP');