summaryrefslogtreecommitdiff
path: root/program/js
diff options
context:
space:
mode:
authoralecpl <alec@alec.pl>2011-04-29 18:36:40 +0000
committeralecpl <alec@alec.pl>2011-04-29 18:36:40 +0000
commitcf58ce8512f389f9b9c1bad3fe6dfcb293163f15 (patch)
treea82c86d2ff91e08ac69afba898620d3d0f9f0b34 /program/js
parentc08b18c4b92cc7c253c72709e3aecb639a742d9f (diff)
- Fix a bug where selecting too many contacts would produce too large URI request (#1487892)
Diffstat (limited to 'program/js')
-rw-r--r--program/js/app.js15
1 files changed, 6 insertions, 9 deletions
diff --git a/program/js/app.js b/program/js/app.js
index 263355643..e83f33715 100644
--- a/program/js/app.js
+++ b/program/js/app.js
@@ -808,10 +808,10 @@ function rcube_webmail()
case 'compose':
var url = this.env.comm_path+'&_action=compose';
- if (this.task=='mail') {
+ if (this.task == 'mail') {
url += '&_mbox='+urlencode(this.env.mailbox);
- if (this.env.mailbox==this.env.drafts_mailbox) {
+ if (this.env.mailbox == this.env.drafts_mailbox) {
var uid;
if (uid = this.get_single_uid())
url += '&_draft_uid='+uid;
@@ -820,7 +820,7 @@ function rcube_webmail()
url += '&_to='+urlencode(props);
}
// modify url if we're in addressbook
- else if (this.task=='addressbook') {
+ else if (this.task == 'addressbook') {
// switch to mail compose step directly
if (props && props.indexOf('@') > 0) {
url = this.get_task_url('mail', url);
@@ -829,25 +829,22 @@ function rcube_webmail()
}
// use contact_id passed as command parameter
- var a_cids = [];
+ var n, len, a_cids = [];
if (props)
a_cids.push(props);
// get selected contacts
else if (this.contact_list) {
var selection = this.contact_list.get_selection();
- for (var n=0; n<selection.length; n++)
+ for (n=0, len=selection.length; n<len; n++)
a_cids.push(selection[n]);
}
if (a_cids.length)
- this.http_request('mailto', '_cid='+urlencode(a_cids.join(','))+'&_source='+urlencode(this.env.source), true);
+ this.http_post('mailto', {_cid: a_cids.join(','), _source: this.env.source}, true);
break;
}
- // don't know if this is necessary...
- url = url.replace(/&_framed=1/, '');
-
this.redirect(url);
break;