summaryrefslogtreecommitdiff
path: root/program/steps/settings/manage_folders.inc
diff options
context:
space:
mode:
Diffstat (limited to 'program/steps/settings/manage_folders.inc')
-rw-r--r--program/steps/settings/manage_folders.inc15
1 files changed, 12 insertions, 3 deletions
diff --git a/program/steps/settings/manage_folders.inc b/program/steps/settings/manage_folders.inc
index 04b2a461e..33d83dfff 100644
--- a/program/steps/settings/manage_folders.inc
+++ b/program/steps/settings/manage_folders.inc
@@ -69,10 +69,15 @@ else if ($_action=='create-folder')
else if ($_action=='delete-folder')
{
if (strlen($_GET['_mboxes']))
- $IMAP->delete_mailbox(explode(',', $_GET['_mboxes']));
+ $deleted = $IMAP->delete_mailbox(explode(',', $_GET['_mboxes']));
- if ($_GET['_remote'])
- rcube_remote_response('// deleted');
+ if ($_GET['_remote'] && $deleted)
+ rcube_remote_response(sprintf("this.remove_folder_row('%s')", rep_specialchars_output($_GET['_mboxes'], 'js')));
+ else if ($_GET['_remote'])
+ {
+ $commands = show_message('errorsaving', 'error');
+ rcube_remote_response($commands);
+ }
}
@@ -174,5 +179,9 @@ function rcube_create_folder_form($attrib)
}
+// add some labels to client
+rcube_add_label('deletefolderconfirm');
+
+
parse_template('managefolders');
?> \ No newline at end of file