1
0
Fork 0
mirror of https://bitbucket.org/vertlach/iusethis.git synced 2024-06-16 23:20:53 +03:00

Fix API calls in MW 1.26 so that voting works again

Kudos to legoktm for the fix!

Change-Id: Id3bffb6f8088699ac931bcadf4dfb5cac4e80ade
This commit is contained in:
Jack Phoenix 2016-08-31 12:05:34 +03:00
parent c21ec6f461
commit 4d4bc6c15a

View file

@ -25,7 +25,7 @@ var VoteNY = function VoteNY() {
* @param PageID Integer: internal ID number of the current article
*/
this.clickVote = function( TheVote, PageID ) {
( new mw.Api() ).postWithToken( 'csrf', {
( new mw.Api() ).postWithToken( 'edit', {
action: 'voteny',
format: 'json',
what: 'vote',
@ -46,7 +46,7 @@ var VoteNY = function VoteNY() {
* @param PageID Integer: internal ID number of the current article
*/
this.unVote = function( PageID ) {
( new mw.Api() ).postWithToken( 'csrf', {
( new mw.Api() ).postWithToken( 'edit', {
action: 'voteny',
format: 'json',
what: 'delete',
@ -77,7 +77,7 @@ var VoteNY = function VoteNY() {
actionName = 'multi';
}
( new mw.Api() ).postWithToken( 'csrf', {
( new mw.Api() ).postWithToken( 'edit', {
action: 'voteny',
type: 'stars',
what: actionName,
@ -95,7 +95,7 @@ var VoteNY = function VoteNY() {
* @param id Integer: ID of the current rating star
*/
this.unVoteStars = function( PageID, id ) {
( new mw.Api() ).postWithToken( 'csrf', {
( new mw.Api() ).postWithToken( 'edit', {
action: 'voteny',
what: 'delete',
type: 'stars',