mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/AJAXPoll
synced 2024-11-23 22:46:17 +00:00
Merge "Fix "Use of the "edit" token is deprecated. Use "csrf" instead.""
This commit is contained in:
commit
0332e5649c
|
@ -29,7 +29,7 @@ var setupEventHandlers = function () {
|
||||||
choice.find( 'input' ).prop( 'checked', 'checked' );
|
choice.find( 'input' ).prop( 'checked', 'checked' );
|
||||||
$( '#ajaxpoll-ajax-' + poll ).text( mw.message( 'ajaxpoll-submitting' ).text() ).css( 'display', 'inline-block' );
|
$( '#ajaxpoll-ajax-' + poll ).text( mw.message( 'ajaxpoll-submitting' ).text() ).css( 'display', 'inline-block' );
|
||||||
|
|
||||||
( new mw.Api() ).postWithToken( 'edit', {
|
( new mw.Api() ).postWithToken( 'csrf', {
|
||||||
action: 'pollsubmitvote',
|
action: 'pollsubmitvote',
|
||||||
format: 'json',
|
format: 'json',
|
||||||
poll: poll,
|
poll: poll,
|
||||||
|
|
Loading…
Reference in a new issue