summaryrefslogtreecommitdiff
path: root/program/js/common.js
diff options
context:
space:
mode:
authorthomascube <thomas@roundcube.net>2010-03-03 12:11:04 +0000
committerthomascube <thomas@roundcube.net>2010-03-03 12:11:04 +0000
commit7910c0ff55edcb9ed973abd680489b9e0f28d0cb (patch)
tree454e6565617cb80667c6f20e8ce985d1304d2acf /program/js/common.js
parentd15d594a42e8fe4e6c11dedcd8ac3e89c445f986 (diff)
Remember search modifiers in user prefs (#1486146) + bring back the old defaults
Diffstat (limited to 'program/js/common.js')
-rw-r--r--program/js/common.js14
1 files changed, 14 insertions, 0 deletions
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)