mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/AbuseFilter.git
synced 2024-11-24 06:03:49 +00:00
1826d39620
The error code 'abusefilter-disallowed' or 'abusefilter-warning' is used, depending on whether the filter only warns (and will allow the action when retried) or prevents the user from performing the action. The API response has been extended with some additional properties. * For simple filters with no custom messages where the only action is 'disallow' or 'warn', the error code is the same as before. * For filters with different actions, different error codes would previously be returned; 'abusefilter-disallowed' will be returned for them all, with the actions taken listed in the .abusefilter.actions property of the API response. * For filters with custom messages, the message key would previously be used as the error code; now 'abusefilter-disallowed' or 'abusefilter-warning' is used, with the message available in the .message property of the API response. Also cleaned up some dead "forwards-compatibility" code and made a recently introduced public method private. The new functionality depends on Ifac8995a4d16d11840cee814177fc2808bc2072c in MediaWiki core, older MediaWiki versions behave mostly as before. The new .message property contains both the key and the parameters duplicated from .abusefilter, so that the client doesn't have to know what AbuseFilter is - it'll be able to just display the given message with the given parameters. My specific use case is the upload dialog in core (core shouldn't have to know about any extensions). See also TitleBlacklist change I97c1f5c6bbbdfc0b8ea9914bb075d5299c14df8f. Bug: T137961 Change-Id: I5780eae96930211191ecd874aacf53fdacb58f89 |
||
---|---|---|
api | ||
db_patches | ||
i18n | ||
maintenance | ||
modules | ||
special | ||
tests | ||
Views | ||
.gitignore | ||
.gitreview | ||
.jshintignore | ||
.jshintrc | ||
AbuseFilter.alias.php | ||
AbuseFilter.class.php | ||
AbuseFilter.hooks.php | ||
AbuseFilter.parser.php | ||
AbuseFilter.php | ||
abusefilter.tables.pg.sql | ||
abusefilter.tables.sql | ||
abusefilter.tables.sqlite.sql | ||
AbuseFilterPreAuthenticationProvider.php | ||
AbuseFilterTokenizer.php | ||
AbuseFilterVariableHolder.php | ||
AbuseLogHitFormatter.php | ||
composer.json | ||
COPYING | ||
extension.json | ||
Gruntfile.js | ||
hooks.txt | ||
package.json | ||
phpcs.xml |