summaryrefslogtreecommitdiff
path: root/program/js
diff options
context:
space:
mode:
Diffstat (limited to 'program/js')
-rw-r--r--program/js/app.js11
-rw-r--r--program/js/common.js14
2 files changed, 21 insertions, 4 deletions
diff --git a/program/js/app.js b/program/js/app.js
index f03b0c5fb..ab70b024b 100644
--- a/program/js/app.js
+++ b/program/js/app.js
@@ -2616,10 +2616,13 @@ function rcube_webmail()
if (this.message_list) {
this.message_list.clear();
if (this.env.search_mods) {
- var head_arr = new Array();
- for (var n in this.env.search_mods)
- head_arr.push(n);
- addurl += '&_headers='+head_arr.join(',');
+ var mods = this.env.search_mods[this.env.mailbox] ? this.env.search_mods[this.env.mailbox] : this.env.search_mods['*'];
+ if (mods) {
+ var head_arr = new Array();
+ for (var n in mods)
+ head_arr.push(n);
+ addurl += '&_headers='+head_arr.join(',');
+ }
}
} else if (this.contact_list) {
this.contact_list.clear(true);
diff --git a/program/js/common.js b/program/js/common.js
index c66ea7655..70ef4446b 100644
--- a/program/js/common.js
+++ b/program/js/common.js
@@ -490,6 +490,20 @@ function find_in_array()
return -1;
}
+// recursively copy an object
+function rcube_clone_object(obj)
+{
+ var out = {};
+
+ for (var key in obj) {
+ if (obj[key] && typeof obj[key] == 'object')
+ out[key] = clone_object(obj[key]);
+ else
+ out[key] = obj[key];
+ }
+
+ return out;
+}
// make a string URL safe
function urlencode(str)