mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/AbuseFilter.git
synced 2024-11-14 09:44:44 +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 |
||
---|---|---|
.. | ||
Consequence | ||
ConsequenceNotPrecheckedException.php | ||
ConsequencesExecutor.php | ||
ConsequencesExecutorFactory.php | ||
ConsequencesFactory.php | ||
ConsequencesLookup.php | ||
ConsequencesRegistry.php | ||
Parameters.php |