2012-12-19 22:27:11 +00:00
|
|
|
This document describes how event hooks work in the AbuseFilter extension.
|
|
|
|
|
|
|
|
For a more comprehensive guide to hooks, navigate to your root MediaWiki
|
|
|
|
directory and read docs/hooks.txt.
|
|
|
|
|
|
|
|
== Events and parameters ==
|
|
|
|
This is a list of known events and parameters; please add to it if you're going
|
|
|
|
to add events to the AbuseFilter extension.
|
|
|
|
|
|
|
|
'AbuseFilter-builder': Allows overwriting of the builder values returned by AbuseFilter::getBuilderValues
|
|
|
|
&$realValues: Builder values
|
|
|
|
|
2012-12-21 17:43:48 +00:00
|
|
|
'AbuseFilter-computeVariable': Like AbuseFilter-interceptVariable but called if the requested method wasn't found.
|
|
|
|
Return true to indicate that the method is known to the hook and was computed successful.
|
|
|
|
$method: Method to generate the variable
|
|
|
|
$vars: AbuseFilterVariableHolder
|
|
|
|
$parameters: Parameters with data to compute the value
|
|
|
|
&$result: Result of the computation
|
|
|
|
|
2012-12-19 22:27:11 +00:00
|
|
|
'AbuseFilter-filterAction': Allows overwriting of abusefilter variables in AbuseFilter::filterAction just
|
|
|
|
before they're checked against filters.
|
2012-12-21 17:43:48 +00:00
|
|
|
$vars: AbuseFilterVariableHolder with variables
|
2012-12-19 22:27:11 +00:00
|
|
|
$title: Title object
|
|
|
|
|
2012-12-21 17:43:48 +00:00
|
|
|
'AbuseFilter-generateTitleVars': Allows altering the variables generated for a title
|
2012-12-19 22:27:11 +00:00
|
|
|
$vars: AbuseFilterVariableHolder
|
2012-12-21 17:43:48 +00:00
|
|
|
$title: Title object
|
|
|
|
$prefix: Variable name prefix
|
2012-12-19 22:27:11 +00:00
|
|
|
|
2012-12-21 17:43:48 +00:00
|
|
|
'AbuseFilter-generateUserVars': Allows altering the variables generated for a specific user
|
|
|
|
$vars: AbuseFilterVariableHolder
|
|
|
|
$user: User object
|
|
|
|
|
|
|
|
'AbuseFilter-interceptVariable': Called before a variable is set in AFComputedVariable::compute to be able to set
|
|
|
|
it before the core code runs. Return false to make the function return right after.
|
2012-12-19 22:27:11 +00:00
|
|
|
$method: Method to generate the variable
|
|
|
|
$vars: AbuseFilterVariableHolder
|
|
|
|
$parameters: Parameters with data to compute the value
|
|
|
|
&$result: Result of the computation
|