summaryrefslogtreecommitdiff
path: root/program/steps/settings
diff options
context:
space:
mode:
authorthomascube <thomas@roundcube.net>2006-07-30 19:38:06 +0000
committerthomascube <thomas@roundcube.net>2006-07-30 19:38:06 +0000
commitf9c107afbe9bb01627a9e6de48efdfbbda8e56e6 (patch)
treec9758b06f319953e2491c601d8fc09bf859e295a /program/steps/settings
parentfe79b1bcf828b6b9f947c4b32d5e7bf297438be4 (diff)
Fixed folder renaming; added confirmation after deleting a folder
Diffstat (limited to 'program/steps/settings')
-rw-r--r--program/steps/settings/manage_folders.inc12
1 files changed, 8 insertions, 4 deletions
diff --git a/program/steps/settings/manage_folders.inc b/program/steps/settings/manage_folders.inc
index 770bac2fd..457fcb5d2 100644
--- a/program/steps/settings/manage_folders.inc
+++ b/program/steps/settings/manage_folders.inc
@@ -67,7 +67,7 @@ else if ($_action=='create-folder')
else if ($_action=='rename-folder')
{
if (!empty($_GET['_folder_oldname']) && !empty($_GET['_folder_newname']))
- $rename = $IMAP->rename_mailbox(get_input_value('_folder_oldname', RCUBE_INPUT_GET), trim(get_input_value('_folder_newname', RCUBE_INPUT_GET)), TRUE);
+ $rename = $IMAP->rename_mailbox(get_input_value('_folder_oldname', RCUBE_INPUT_GET), trim(get_input_value('_folder_newname', RCUBE_INPUT_GET)));
if ($rename && $REMOTE_REQUEST)
{
@@ -89,11 +89,15 @@ else if ($_action=='rename-folder')
// delete an existing IMAP mailbox
else if ($_action=='delete-folder')
{
- if (strlen($_GET['_mboxes']))
- $deleted = $IMAP->delete_mailbox(array($_GET['_mboxes']));
+ if (!empty($_GET['_mboxes']))
+ $deleted = $IMAP->delete_mailbox(array(get_input_value('_mboxes', RCUBE_INPUT_GET)));
if ($REMOTE_REQUEST && $deleted)
- rcube_remote_response(sprintf("this.remove_folder_row('%s')", rep_specialchars_output($_GET['_mboxes'], 'js')));
+ {
+ $commands = sprintf("this.remove_folder_row('%s');\n", rep_specialchars_output(get_input_value('_mboxes', RCUBE_INPUT_GET), 'js'));
+ $commands .= show_message('folderdeleted', 'confirmation');
+ rcube_remote_response($commands);
+ }
else if ($REMOTE_REQUEST)
{
$commands = show_message('errorsaving', 'error');