From 4fb6a28be20df102e8f410c66ea5547343c2264a Mon Sep 17 00:00:00 2001 From: alecpl Date: Wed, 1 Jun 2011 19:31:53 +0000 Subject: [PATCH] - Fix doubled encoding in save-pref request (#1487941), small code improvements --- program/include/main.inc | 2 +- program/js/app.js | 55 +++++++++++++++++++++------------------- 2 files changed, 30 insertions(+), 27 deletions(-) diff --git a/program/include/main.inc b/program/include/main.inc index 1ded90270..d630628cc 100644 --- a/program/include/main.inc +++ b/program/include/main.inc @@ -1205,7 +1205,7 @@ function rcmail_mailbox_list($attrib) $RCMAIL->output->add_gui_object('mailboxlist', $attrib['id']); $RCMAIL->output->set_env('mailboxes', $js_mailboxlist); - $RCMAIL->output->set_env('collapsed_folders', $RCMAIL->config->get('collapsed_folders')); + $RCMAIL->output->set_env('collapsed_folders', (string)$RCMAIL->config->get('collapsed_folders')); } return $out; diff --git a/program/js/app.js b/program/js/app.js index 7878c9c4c..405a12fc8 100644 --- a/program/js/app.js +++ b/program/js/app.js @@ -280,7 +280,6 @@ function rcube_webmail() break; - case 'addressbook': if (this.gui_objects.folderlist) this.env.contactfolders = $.extend($.extend({}, this.env.address_sources), this.env.contactgroups); @@ -1178,10 +1177,10 @@ function rcube_webmail() this.save_pref = function(prop) { - var request = {'_name': prop.name, '_value': urlencode(prop.value)}; + var request = {'_name': prop.name, '_value': prop.value}; if (prop.session) - request['_session'] = urlencode(prop.session); + request['_session'] = prop.session; if (prop.env) this.env[prop.env] = prop.value; @@ -2606,33 +2605,35 @@ function rcube_webmail() // set class to read/unread this.toggle_read_status = function(flag, a_uids) { + var i, len = a_uids.length, + url = '_uid='+this.uids_to_list(a_uids)+'&_flag='+flag, + lock = this.display_message(this.get_label('markingmessage'), 'loading'); + // mark all message rows as read/unread - for (var i=0; i