Merge "ContentHandler: remove last wfRunHooks() call in includes"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Tue, 28 Apr 2015 04:55:41 +0000 (04:55 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Tue, 28 Apr 2015 04:55:41 +0000 (04:55 +0000)
img_auth.php
maintenance/benchmarks/benchmarkHooks.php
maintenance/language/checkLanguage.inc
maintenance/language/languages.inc
maintenance/refreshLinks.php
opensearch_desc.php
thumb.php

index f44cac0..22fd401 100644 (file)
@@ -151,7 +151,7 @@ function wfImageAuthMain() {
                // Run hook for extension authorization plugins
                /** @var $result array */
                $result = null;
-               if ( !wfRunHooks( 'ImgAuthBeforeStream', array( &$title, &$path, &$name, &$result ) ) ) {
+               if ( !Hooks::run( 'ImgAuthBeforeStream', array( &$title, &$path, &$name, &$result ) ) ) {
                        wfForbidden( $result[0], $result[1], array_slice( $result, 2 ) );
                        return;
                }
index fb25b9d..1446871 100644 (file)
@@ -66,7 +66,7 @@ class BenchmarkHooks extends Benchmarker {
        private function benchHooks( $trials = 10 ) {
                $start = microtime( true );
                for ( $i = 0; $i < $trials; $i++ ) {
-                       wfRunHooks( 'Test' );
+                       Hooks::run( 'Test' );
                }
                $delta = microtime( true ) - $start;
                $pertrial = $delta / $trials;
index 990f258..0c3ea67 100644 (file)
@@ -339,7 +339,7 @@ ENDS;
 
                $blacklist = $checkBlacklist;
 
-               wfRunHooks( 'LocalisationChecksBlacklist', array( &$blacklist ) );
+               Hooks::run( 'LocalisationChecksBlacklist', array( &$blacklist ) );
 
                return $blacklist;
        }
index fb496cb..9affb9e 100644 (file)
@@ -63,7 +63,7 @@ class Languages {
         * files in the languages directory.
         */
        function __construct() {
-               wfRunHooks( 'LocalisationIgnoredOptionalMessages',
+               Hooks::run( 'LocalisationIgnoredOptionalMessages',
                        array( &$this->mIgnoredMessages, &$this->mOptionalMessages ) );
 
                $this->mLanguages = array_keys( Language::fetchLanguageNames( null, 'mwfile' ) );
index e1b6ac6..5d311ad 100644 (file)
@@ -83,7 +83,7 @@ class RefreshLinks extends Maintenance {
                }
 
                // Give extensions a chance to optimize settings
-               wfRunHooks( 'MaintenanceRefreshLinksInit', array( $this ) );
+               Hooks::run( 'MaintenanceRefreshLinksInit', array( $this ) );
 
                # Don't generate extension images (e.g. Timeline)
                $wgParser->clearTagHooks();
index 5e5e35d..0b56972 100644 (file)
@@ -94,7 +94,7 @@ foreach ( $wgOpenSearchTemplates as $type => $template ) {
 
 // Allow hooks to override the suggestion URL settings in a more
 // general way than overriding the whole search engine...
-wfRunHooks( 'OpenSearchUrls', array( &$urls ) );
+Hooks::run( 'OpenSearchUrls', array( &$urls ) );
 
 foreach ( $urls as $attribs ) {
        print Xml::element( 'Url', $attribs );
index 2ea3f07..2079a64 100644 (file)
--- a/thumb.php
+++ b/thumb.php
@@ -502,7 +502,7 @@ function wfExtractThumbParams( $file, $params ) {
        unset( $params['thumbName'] );
 
        // Do the hook first for older extensions that rely on it.
-       if ( !wfRunHooks( 'ExtractThumbParameters', array( $thumbname, &$params ) ) ) {
+       if ( !Hooks::run( 'ExtractThumbParameters', array( $thumbname, &$params ) ) ) {
                // Check hooks if parameters can be extracted
                // Hooks return false if they manage to *resolve* the parameters
                // This hook should be considered deprecated