mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/AbuseFilter.git
synced 2024-11-27 15:30:42 +00:00
Add hook to AFPComputedVariable::compute() so extensions can add lazy-loaded variables.
This commit is contained in:
parent
32c83009e3
commit
2000d06c59
|
@ -341,9 +341,12 @@ class AFComputedVariable {
|
|||
$result = '';
|
||||
break;
|
||||
default:
|
||||
throw new AFPException( "Unknown variable compute type ".$this->mMethod );
|
||||
if ( wfRunHooks( 'AbuseFilter-computeVariable',
|
||||
array( $this->mMethod, $vars ) ) ) {
|
||||
throw new AFPException( "Unknown variable compute type ".$this->mMethod );
|
||||
}
|
||||
}
|
||||
|
||||
return AFPData::newFromPHPVar( $result );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue