dépôts
/
lhc
/
web
/
wiklou.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
46b25eb
)
mediawiki.api: Log warning when requesting legacy token types
author
Ricordisamoa
<ricordisamoa@openmailbox.org>
Tue, 15 Mar 2016 15:53:05 +0000
(16:53 +0100)
committer
Krinkle
<krinklemail@gmail.com>
Wed, 13 Apr 2016 19:40:34 +0000
(19:40 +0000)
Change-Id: Ia2c795a95b58f62f4687501a5537e5890d90144e
resources/src/mediawiki/api.js
patch
|
blob
|
history
diff --git
a/resources/src/mediawiki/api.js
b/resources/src/mediawiki/api.js
index
64e5976
..
3bc0ad3
100644
(file)
--- a/
resources/src/mediawiki/api.js
+++ b/
resources/src/mediawiki/api.js
@@
-39,7
+39,12
@@
'import',
'options'
];
- return $.inArray( action, csrfActions ) !== -1 ? 'csrf' : action;
+ if ( $.inArray( action, csrfActions ) !== -1 ) {
+ mw.track( 'mw.deprecate', 'apitoken_' + action );
+ mw.log.warn( 'Use of the "' + action + '" token is deprecated. Use "csrf" instead.' );
+ return 'csrf';
+ }
+ return action;
}
// Pre-populate with fake ajax promises to save http requests for tokens