Go to file
Daimona Eaytoy 4720c97530 Add a new class for methods related to running filters
Currently we strongly abuse (pardon the pun) the AbuseFilter class: its
purpose should be to hold static functions intended as generic utility
functions (e.g. to format messages, determine whether a filter is global
etc.), but we actually use it for all methods related to running filters.
This patch creates a new class, AbuseFilterRunner, containing all such
methods, which have been made non-static. This leads to several
improvements (also for related methods and the parser), and opens the
way to further improve the code.
Aside from making the code prettier, less global and easier to test,
this patch could also produce a performance improvement, although I
don't have tools to measure that.
Also note that many public methods have been removed, and almost any of
them has been made protected; a couple of them (the ones used from outside)
are left for back-compat, and will be removed in the future.

Change-Id: I2eab2e50356eeb5224446ee2d0df9c787ae95b80
2019-07-23 19:06:27 +00:00
.phan Migrate to new phan 2019-03-16 09:41:23 +00:00
db_patches Drop afl_log_id 2019-06-28 17:55:55 +00:00
i18n Localisation updates from https://translatewiki.net. 2019-07-23 08:53:22 +02:00
includes Add a new class for methods related to running filters 2019-07-23 19:06:27 +00:00
maintenance Add a maintenance script to fix broken log entries 2019-07-15 11:59:45 +00:00
modules Simplify by using mw.util.getUrl 2019-07-03 08:43:40 +02:00
tests Add a new class for methods related to running filters 2019-07-23 19:06:27 +00:00
.eslintrc.json build: Upgrade eslint-config-wikimedia from 0.10.1 to 0.11.0 2019-04-03 15:44:45 -07:00
.gitignore build: Upgrade eslint-config-wikimedia from 0.10.1 to 0.11.0 2019-04-03 15:44:45 -07:00
.gitreview Whoops, track not trace 2016-10-24 17:01:30 -07:00
.phpcs.xml Merge "Don't use wgLang and wgContLang" 2019-03-17 09:53:16 +00:00
.stylelintrc.json build: Bump devDependencies to latest 2018-02-10 21:00:53 +00:00
AbuseFilter.alias.php Add aliases for Serbian language 2018-12-24 02:16:55 +00:00
abusefilter.tables.pg.sql Drop afl_log_id 2019-06-28 17:55:55 +00:00
abusefilter.tables.sql Drop afl_log_id 2019-06-28 17:55:55 +00:00
abusefilter.tables.sqlite.sql Drop afl_log_id 2019-06-28 17:55:55 +00:00
CODE_OF_CONDUCT.md build: Updating mediawiki/phan-taint-check-plugin to 1.4.0 2018-09-01 05:29:54 +00:00
composer.json build: Upgrade phan-taint-check-plugin from 1.5.x to 2.0.1 2019-07-10 15:30:52 +00:00
COPYING
extension.json Add a new class for methods related to running filters 2019-07-23 19:06:27 +00:00
Gruntfile.js build: Upgrade eslint-config-wikimedia 0.12.0, drop grunt-jsonlint 2019-05-06 13:56:54 -07:00
hooks.txt Rename the filterAction hook and add a parameter 2019-07-04 18:10:47 +00:00
package-lock.json build: Updating npm dependencies 2019-07-14 07:35:03 +00:00
package.json build: Updating npm dependencies for security issues 2019-06-07 20:12:00 +00:00