aboutsummaryrefslogtreecommitdiffstats
path: root/themes/default/js/scripts.js
diff options
context:
space:
mode:
authorrvelices <rv-github@modusoptimus.com>2011-07-26 04:34:36 +0000
committerrvelices <rv-github@modusoptimus.com>2011-07-26 04:34:36 +0000
commitdd212fc6a184bd7fd660d1db6698d5bfb54a140a (patch)
tree233a37019990e3c3b426836795be3cb29bca2000 /themes/default/js/scripts.js
parent41202b1f2b42185e7b8020f856fead0ba0fb9e0b (diff)
- ws accepts method name in GET paraeters even if http method is POST (easier to see in apache logs)
- picture rating is done through POST and not GET git-svn-id: http://piwigo.org/svn/trunk@11834 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r--themes/default/js/scripts.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/themes/default/js/scripts.js b/themes/default/js/scripts.js
index 25707880a..848179592 100644
--- a/themes/default/js/scripts.js
+++ b/themes/default/js/scripts.js
@@ -60,9 +60,9 @@ PwgWS.prototype = {
}
this.xhr.onreadystatechange = pwgBind(this, this.onStateChange);
- var url = this.urlRoot+"ws.php?format=json";
+ var url = this.urlRoot+"ws.php?format=json&method="+method;
- var body = "method="+method;
+ var body = "";
if (parameters)
{
for (var prop in parameters)
@@ -70,10 +70,10 @@ PwgWS.prototype = {
if ( typeof parameters[prop] == 'object' && parameters[prop])
{
for (var i=0; i<parameters[prop].length; i++)
- body += "&"+prop+"[]="+encodeURIComponent(parameters[prop][i]);
+ body += prop+"[]="+encodeURIComponent(parameters[prop][i])+"&";
}
else
- body += "&"+prop+"="+encodeURIComponent(parameters[prop]);
+ body += prop+"="+encodeURIComponent(parameters[prop])+"&";
}
}