From ca33f32b607966b9d774ae1c6261031056212a33 Mon Sep 17 00:00:00 2001 From: Thomas Bruederli Date: Fri, 18 Apr 2014 17:26:25 +0200 Subject: Fix submission of multi-folder message selection through hidden form fields --- plugins/zipdownload/zipdownload.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'plugins') 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($('').attr({type: 'hidden', name: k, value: v})); + if (typeof v == 'object' && v.length > 1) { + for (var j=0; j < v.length; j++) + inputs.push($('').attr({type: 'hidden', name: k+'[]', value: v[j]})); + } + else { + inputs.push($('').attr({type: 'hidden', name: k, value: v})); + } }); if (!form.length) -- cgit v1.2.3