Merge "Remove use of deprecated wfRunHooks"

This commit is contained in:
jenkins-bot 2015-08-06 17:32:06 +00:00 committed by Gerrit Code Review
commit ecc314a379
2 changed files with 7 additions and 7 deletions

View file

@ -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();

View file

@ -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 );
}