mediawiki-gateway icon indicating copy to clipboard operation
mediawiki-gateway copied to clipboard

use new meta method to fetch token

Open MusikAnimal opened this issue 9 years ago • 1 comments

Per API:Tokens, with MediaWiki v1.24 or later we should be fetching a token via action=query&meta=tokens, disregarding the page we are actioning on. This of course means we are dropping support for earlier MediaWiki versions. Maybe there's a way to check which version they are using?

MusikAnimal avatar Oct 27 '15 18:10 MusikAnimal

Thanks, but since people often use this to connect to older versions I can't accept a breaking change. Can you rewrite this either to try/catch both methods, or poke at eg. https://www.mediawiki.org/wiki/API:Siteinfo and check the version there?

jpatokal avatar Oct 28 '15 12:10 jpatokal