summaryrefslogtreecommitdiff
path: root/roundcubemail/program/js
diff options
context:
space:
mode:
authorrobin <robin@208e9e7b-5314-0410-a742-e7e81cd9613c>2007-09-27 07:31:40 +0000
committerrobin <robin@208e9e7b-5314-0410-a742-e7e81cd9613c>2007-09-27 07:31:40 +0000
commit47bfe34cbc9db46a6e8cdad987398bf24f0e54d5 (patch)
tree3bb51a896d0e5163c367bf077ffe402d6ac4ad1b /roundcubemail/program/js
parentf11eda2b816250d50475decd7fe12b9bf79f8926 (diff)
When a folder is deleted, delete the children as well.
git-svn-id: https://svn.roundcube.net/trunk@833 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program/js')
-rw-r--r--roundcubemail/program/js/app.js10
1 files changed, 8 insertions, 2 deletions
diff --git a/roundcubemail/program/js/app.js b/roundcubemail/program/js/app.js
index 3e1129bf1..b2fccb717 100644
--- a/roundcubemail/program/js/app.js
+++ b/roundcubemail/program/js/app.js
@@ -2637,11 +2637,17 @@ function rcube_webmail()
// delete a specific mailbox with all its messages
this.delete_folder = function(folder)
{
- if (this.edit_folder)
- this.reset_folder_rename();
+ if (this.edit_folder)
+ this.reset_folder_rename();
if (folder)
+ {
this.http_post('delete-folder', '_mboxes='+urlencode(folder));
+ var folders = new Array(folder);
+ for (var row in this.env.subscriptionrows)
+ if (this.env.subscriptionrows[row][0].match(new RegExp('^'+RegExp.escape(folder+this.env.delimiter))))
+ this.http_post('delete-folder', '_mboxes='+urlencode(this.env.subscriptionrows[row][0]));
+ }
};