Ignore:
Timestamp:
Jul 26, 2011, 6:34:36 AM (13 years ago)
Author:
rvelices
Message:
  • 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
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/themes/default/js/scripts.js

    r8449 r11834  
    6161                this.xhr.onreadystatechange = pwgBind(this, this.onStateChange);
    6262
    63                 var url = this.urlRoot+"ws.php?format=json";
     63                var url = this.urlRoot+"ws.php?format=json&method="+method;
    6464
    65                 var body = "method="+method;
     65                var body = "";
    6666                if (parameters)
    6767                {
     
    7171                                {
    7272                                        for (var i=0; i<parameters[prop].length; i++)
    73                                                 body += "&"+prop+"[]="+encodeURIComponent(parameters[prop][i]);
     73                                                body += prop+"[]="+encodeURIComponent(parameters[prop][i])+"&";
    7474                                }
    7575                                else
    76                                         body += "&"+prop+"="+encodeURIComponent(parameters[prop]);
     76                                        body += prop+"="+encodeURIComponent(parameters[prop])+"&";
    7777                        }
    7878                }
Note: See TracChangeset for help on using the changeset viewer.