Go to file
Marius Hoch fc27474834 Fixing several issues with the titleblacklist API
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
2012-10-27 14:41:15 +02:00
api Fixing several issues with the titleblacklist API 2012-10-27 14:41:15 +02:00
tests Fixing several issues with the titleblacklist API 2012-10-27 14:41:15 +02:00
.gitignore Maintenance for TitleBlacklist extension. 2012-09-18 15:57:57 +02:00
.gitreview Adding .gitreview 2012-03-23 10:35:26 -07:00
TitleBlacklist.hooks.php Maintenance for TitleBlacklist extension. 2012-09-18 15:57:57 +02:00
TitleBlacklist.i18n.php Localisation updates from http://translatewiki.net. 2012-10-12 21:21:29 +00:00
TitleBlacklist.list.php Remove comment and update docs. 2012-09-24 02:24:32 -07:00
TitleBlacklist.php Maintenance for TitleBlacklist extension. 2012-09-18 15:57:57 +02:00