mw.Api: Replace deprecated token names by 'csrf'
[lhc/web/wiklou.git] / resources / src / mediawiki / api / options.js
index 9dd276d..0af2a75 100644 (file)
                                        }
                                } else {
                                        if ( value !== null ) {
-                                               deferreds.push( this.postWithToken( 'options', {
+                                               deferreds.push( this.postWithToken( 'csrf', {
+                                                       formatversion: 2,
                                                        action: 'options',
                                                        optionname: name,
                                                        optionvalue: value
                                                } ) );
                                        } else {
                                                // Omitting value resets the option
-                                               deferreds.push( this.postWithToken( 'options', {
+                                               deferreds.push( this.postWithToken( 'csrf', {
+                                                       formatversion: 2,
                                                        action: 'options',
                                                        optionname: name
                                                } ) );
@@ -70,7 +72,8 @@
                        }
 
                        if ( grouped.length ) {
-                               deferreds.push( this.postWithToken( 'options', {
+                               deferreds.push( this.postWithToken( 'csrf', {
+                                       formatversion: 2,
                                        action: 'options',
                                        change: grouped
                                } ) );