This is treated as a boolean parameter, let's make it actually be one so
it shows up correctly in ApiSandbox.
Change-Id: Ie2d2bf28165eca8883e8453a88a9c4e2d9603a78
Since this extension uses extension.json, it already requires 1.25+ so
no need to keep the old code around.
Change-Id: I4acbeec983367f0bd3e7b1996d377bb6e5835d63
MediaWiki core change I04b1a384 added support for i18n of API module
help. This takes advantage of that while still maintaining backwards
compatibility with earlier versions of MediaWiki.
Once support for MediaWiki before 1.25 is dropped, the methods marked
deprecated in this patch may be removed.
Change-Id: I67395aff48185f3e09da31b51a08aa2541fe6a17
I've fixed four issue with the API of this extension:
1. The extension always assumed the user wants to override the
blacklist, if he's allowed to do so, but that's not the case.
Introduced 'tbnooverride' to prevent that.
2. The API used actions not internally supported by
TitleBlacklistEntry::matches() which made it impossible to check
whether an account name is ok, if the regexp which would prevent
this was set to new account only. Therefore I've introduced the
new action 'new-account'.
3. Same as 2 for the 'upload'
4. The API always returned the 'titleblacklist-forbidden-edit'
message, even if there was a more suitable one. Fixed that.
Example:
https://meta.wikimedia.org/w/api.php?action=titleblacklist&tbtitle=User:Steward&tbaction=create
(this should match the expression .*steward.* <newaccountonly> on
https://meta.wikimedia.org/wiki/Title_blacklist but it doesn't)
Furthermore I've adjusted the unit tests slightly to test whether
tboverride works and whether <newaccountonly> works.
Change-Id: I2d948c84de39c6ee1c1eea7e6cd7b31506d6cb92