1
0
Fork 0

Fixed session param bug

This commit is contained in:
magnolia-fan 2011-06-29 04:25:36 +04:00
parent 9d7770b282
commit 08295f01aa
2 changed files with 6 additions and 7 deletions

View File

@ -20,7 +20,7 @@ class Session
query: (url, params, callback) -> query: (url, params, callback) ->
q_params = @vk_params q_params = @vk_params
for attr in params $.each params, (key, val) ->
q_params[attr] = params[attr] q_params[key] = val
$.post url, q_params, callback $.post url, q_params, callback
false false

View File

@ -22,12 +22,11 @@ Session = (function() {
return this.user; return this.user;
}; };
Session.prototype.query = function(url, params, callback) { Session.prototype.query = function(url, params, callback) {
var attr, q_params, _i, _len; var q_params;
q_params = this.vk_params; q_params = this.vk_params;
for (_i = 0, _len = params.length; _i < _len; _i++) { $.each(params, function(key, val) {
attr = params[_i]; return q_params[key] = val;
q_params[attr] = params[attr]; });
}
$.post(url, q_params, callback); $.post(url, q_params, callback);
return false; return false;
}; };