aboutsummaryrefslogtreecommitdiff
path: root/js/lib
diff options
context:
space:
mode:
authorewinslow <ewinslow@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-11-20 07:00:32 +0000
committerewinslow <ewinslow@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-11-20 07:00:32 +0000
commit1702fd784aace9f5d78dd252b89185a13f195aaa (patch)
tree83846be480665c3e679ae47408a0430dd3b20153 /js/lib
parent58794fd3d17801db697b4b6feb5ca0b3c7229e24 (diff)
downloadelgg-1702fd784aace9f5d78dd252b89185a13f195aaa.tar.gz
elgg-1702fd784aace9f5d78dd252b89185a13f195aaa.tar.bz2
Utilizing elgg.extend, rather than jQuery.extend
git-svn-id: http://code.elgg.org/elgg/trunk@7363 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'js/lib')
-rw-r--r--js/lib/security.js16
1 files changed, 8 insertions, 8 deletions
diff --git a/js/lib/security.js b/js/lib/security.js
index ab5c829be..7f04f0cfb 100644
--- a/js/lib/security.js
+++ b/js/lib/security.js
@@ -8,11 +8,11 @@ elgg.security.token = {};
elgg.security.setToken = function(json) {
//update the convenience object
elgg.security.token = json;
-
+
//also update all forms
$('[name=__elgg_ts]').val(json.__elgg_ts);
$('[name=__elgg_token]').val(json.__elgg_token);
-
+
//also update all links
$('[href]').each(function() {
this.href = this.href
@@ -34,7 +34,7 @@ elgg.security.refreshToken = function() {
/**
* Add elgg action tokens to an object or string (assumed to be url data)
- *
+ *
* @param {Object|string} data
* @return {Object} The new data object including action tokens
* @private
@@ -48,19 +48,19 @@ elgg.security.addToken = function(data) {
args.push(data);
}
args.push("__elgg_ts=" + elgg.security.token.__elgg_ts);
- args.push("__elgg_token=" + elgg.security.token.__elgg_token)
-
+ args.push("__elgg_token=" + elgg.security.token.__elgg_token);
+
return args.join('&');
}
-
+
// no input! acts like a getter
if (elgg.isUndefined(data)) {
return elgg.security.token;
}
-
+
// {...}
if (elgg.isPlainObject(data)) {
- return $.extend(data, elgg.security.token);
+ return elgg.extend(data, elgg.security.token);
}
// oops, don't recognize that!