summaryrefslogtreecommitdiff
path: root/plugins/zipdownload
diff options
context:
space:
mode:
authorThomas Bruederli <thomas@roundcube.net>2014-04-18 17:26:25 +0200
committerThomas Bruederli <thomas@roundcube.net>2014-04-18 17:26:25 +0200
commitca33f32b607966b9d774ae1c6261031056212a33 (patch)
treeea59a57728b684831a31e0d4b1779eb862be9e7f /plugins/zipdownload
parent9429087f67d5babe32ff496eadca52788e9f2547 (diff)
Fix submission of multi-folder message selection through hidden form fields
Diffstat (limited to 'plugins/zipdownload')
-rw-r--r--plugins/zipdownload/zipdownload.js8
1 files changed, 7 insertions, 1 deletions
diff --git a/plugins/zipdownload/zipdownload.js b/plugins/zipdownload/zipdownload.js
index 0e0249dd3..7629e9b20 100644
--- a/plugins/zipdownload/zipdownload.js
+++ b/plugins/zipdownload/zipdownload.js
@@ -65,7 +65,13 @@ function rcmail_zipdownload(mode)
post._token = rcmail.env.request_token;
$.each(post, function(k, v) {
- inputs.push($('<input>').attr({type: 'hidden', name: k, value: v}));
+ if (typeof v == 'object' && v.length > 1) {
+ for (var j=0; j < v.length; j++)
+ inputs.push($('<input>').attr({type: 'hidden', name: k+'[]', value: v[j]}));
+ }
+ else {
+ inputs.push($('<input>').attr({type: 'hidden', name: k, value: v}));
+ }
});
if (!form.length)