diff --git a/hooks.txt b/hooks.txt index d2b2c5ba4..6380fded9 100644 --- a/hooks.txt +++ b/hooks.txt @@ -27,12 +27,20 @@ will be used for non-text content. $content: The Content object &$text: Set this to the desired text. -'AbuseFilter-filterAction': Allows overwriting of abusefilter variables in AbuseFilter::filterAction just -before they're checked against filters. Note that you may specify custom variables in a saner way using other hooks: +'AbuseFilter-filterAction': DEPRECATED! Use AbuseFilterAlterVariables instead. +Allows overwriting of abusefilter variables in AbuseFilter::filterAction just before they're +checked against filters. Note that you may specify custom variables in a saner way using other hooks: AbuseFilter-generateTitleVars, AbuseFilter-generateUserVars and AbuseFilter-generateStaticVars. $vars: AbuseFilterVariableHolder with variables $title: Title object +'AbuseFilterAlterVariables': Allows overwriting of abusefilter variables just before they're +checked against filters. Note that you may specify custom variables in a saner way using other hooks: +AbuseFilter-generateTitleVars, AbuseFilter-generateUserVars and AbuseFilter-generateStaticVars. +$vars: AbuseFilterVariableHolder with variables +$title: Title object target of the action +$user: User object performer of the action + 'AbuseFilter-generateTitleVars': Allows altering the variables generated for a title $vars: AbuseFilterVariableHolder $title: Title object diff --git a/includes/AbuseFilter.php b/includes/AbuseFilter.php index e80563772..0e992b231 100644 --- a/includes/AbuseFilter.php +++ b/includes/AbuseFilter.php @@ -1158,6 +1158,7 @@ class AbuseFilter { // Add vars from extensions Hooks::run( 'AbuseFilter-filterAction', [ &$vars, $title ] ); + Hooks::run( 'AbuseFilterAlterVariables', [ &$vars, $title, $user ] ); $vars->addHolders( self::generateStaticVars() ); $vars->forFilter = true;