mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/AbuseFilter.git
synced 2024-11-15 02:03:53 +00:00
2de5fce177
Introduce shorter methods, one for each steps, so that it's easier to understand what the code is doing and figure out if the order makes sense. The ConsequencesExecutor test is now a proper unit test. Also simplify AbuseFilterConsequencesTest, removing old/wrong logic and fixing two expected values that were actually wrong (but worked because of the aforementioned wrong logic). The only functional changes should be: - We pick the longest block *after* checking the ConsequenceDisabler consequences, so e.g. if a filter has a long block + warn and another filter has a shorter block, we still keep the second one if warn will disable the block. - Remove disallow in presence of dangerous actions after checking ConsequenceDisabler's and deduplicating blocks. Otherwise we may remove disallow for filters where block (etc.) doesn't end up being disabled. We may also want to consider not removing disallow at all, now that messages are customizable. Bug: T303059 Change-Id: If00adbf2056758222eaaea70b16d3b4f89502c20 |
||
---|---|---|
.. | ||
Api | ||
ChangeTags | ||
Consequences | ||
EditBox | ||
Filter | ||
Hooks | ||
LogFormatter | ||
Pager | ||
Parser | ||
Special | ||
VariableGenerator | ||
Variables | ||
View | ||
Watcher | ||
AbuseFilter.php | ||
AbuseFilterChangesList.php | ||
AbuseFilterPermissionManager.php | ||
AbuseFilterPreAuthenticationProvider.php | ||
AbuseFilterServices.php | ||
AbuseLogger.php | ||
AbuseLoggerFactory.php | ||
ActionSpecifier.php | ||
BlockAutopromoteStore.php | ||
CentralDBManager.php | ||
CentralDBNotAvailableException.php | ||
EchoNotifier.php | ||
EditRevUpdater.php | ||
EditStashCache.php | ||
EmergencyCache.php | ||
FilterCompare.php | ||
FilterImporter.php | ||
FilterLookup.php | ||
FilterProfiler.php | ||
FilterRunner.php | ||
FilterRunnerFactory.php | ||
FilterStore.php | ||
FilterUser.php | ||
FilterValidator.php | ||
GlobalNameUtils.php | ||
InvalidImportDataException.php | ||
KeywordsManager.php | ||
RunnerData.php | ||
ServiceWiring.php | ||
SpecsFormatter.php | ||
TableDiffFormatterFullContext.php | ||
TextExtractor.php | ||
ThrottleFilterPresentationModel.php |