mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/AbuseFilter.git
synced 2024-11-24 06:03:49 +00:00
Merge "Remove use of deprecated wfRunHooks"
This commit is contained in:
commit
ecc314a379
|
@ -236,7 +236,7 @@ class AbuseFilter {
|
|||
array( 'user' => $user, 'method' => 'isBlocked' )
|
||||
);
|
||||
|
||||
wfRunHooks( 'AbuseFilter-generateUserVars', array( $vars, $user ) );
|
||||
Hooks::run( 'AbuseFilter-generateUserVars', array( $vars, $user ) );
|
||||
|
||||
return $vars;
|
||||
}
|
||||
|
@ -256,7 +256,7 @@ class AbuseFilter {
|
|||
if ( !$wgDisableCounters ) {
|
||||
$realValues['vars']['article_views'] = 'article-views';
|
||||
}
|
||||
wfRunHooks( 'AbuseFilter-builder', array( &$realValues ) );
|
||||
Hooks::run( 'AbuseFilter-builder', array( &$realValues ) );
|
||||
|
||||
return $realValues;
|
||||
}
|
||||
|
@ -360,7 +360,7 @@ class AbuseFilter {
|
|||
'namespace' => $title->getNamespace()
|
||||
) );
|
||||
|
||||
wfRunHooks( 'AbuseFilter-generateTitleVars', array( $vars, $title, $prefix ) );
|
||||
Hooks::run( 'AbuseFilter-generateTitleVars', array( $vars, $title, $prefix ) );
|
||||
|
||||
return $vars;
|
||||
}
|
||||
|
@ -799,7 +799,7 @@ class AbuseFilter {
|
|||
}
|
||||
|
||||
// Add vars from extensions
|
||||
wfRunHooks( 'AbuseFilter-filterAction', array( &$vars, $title ) );
|
||||
Hooks::run( 'AbuseFilter-filterAction', array( &$vars, $title ) );
|
||||
|
||||
// Set context
|
||||
$vars->setVar( 'context', 'filter' );
|
||||
|
@ -2229,7 +2229,7 @@ class AbuseFilter {
|
|||
static function contentToString( Content $content ) {
|
||||
$text = null;
|
||||
|
||||
if ( wfRunHooks( 'AbuseFilter-contentToString', array( $content, &$text ) ) ) {
|
||||
if ( Hooks::run( 'AbuseFilter-contentToString', array( $content, &$text ) ) ) {
|
||||
$text = $content instanceof TextContent
|
||||
? $content->getNativeData()
|
||||
: $content->getTextForSearchIndex();
|
||||
|
|
|
@ -333,7 +333,7 @@ class AFComputedVariable {
|
|||
$parameters = $this->mParameters;
|
||||
$result = null;
|
||||
|
||||
if ( !wfRunHooks( 'AbuseFilter-interceptVariable',
|
||||
if ( !Hooks::run( 'AbuseFilter-interceptVariable',
|
||||
array( $this->mMethod, $vars, $parameters, &$result ) ) ) {
|
||||
return $result instanceof AFPData
|
||||
? $result : AFPData::newFromPHPVar( $result );
|
||||
|
@ -599,7 +599,7 @@ class AFComputedVariable {
|
|||
$result = AbuseFilter::revisionToString( $rev );
|
||||
break;
|
||||
default:
|
||||
if ( wfRunHooks( 'AbuseFilter-computeVariable',
|
||||
if ( Hooks::run( 'AbuseFilter-computeVariable',
|
||||
array( $this->mMethod, $vars, $parameters, &$result ) ) ) {
|
||||
throw new AFPException( 'Unknown variable compute type ' . $this->mMethod );
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue