Replace wfRunHooks calls with direct Hooks::run calls
[lhc/web/wiklou.git] / includes / cache / MessageCache.php
index e34961c..532236e 100644 (file)
@@ -72,7 +72,7 @@ class MessageCache {
        protected $mExpiry;
 
        /**
-        * Message cache has it's own parser which it uses to transform
+        * Message cache has its own parser which it uses to transform
         * messages.
         */
        protected $mParserOptions, $mParser;
@@ -422,7 +422,7 @@ class MessageCache {
                        $this->mLoadedLanguages[$code] = true;
                }
                $info = implode( ', ', $where );
-               wfDebug( __METHOD__ . ": Loading $code... $info\n" );
+               wfDebugLog( 'MessageCache', __METHOD__ . ": Loading $code... $info\n" );
                wfProfileOut( __METHOD__ );
 
                return $success;
@@ -573,9 +573,9 @@ class MessageCache {
 
                // Update the message in the message blob store
                global $wgContLang;
-               MessageBlobStore::updateMessage( $wgContLang->lcfirst( $msg ) );
+               MessageBlobStore::getInstance()->updateMessage( $wgContLang->lcfirst( $msg ) );
 
-               wfRunHooks( 'MessageCacheReplace', array( $title, $text ) );
+               Hooks::run( 'MessageCacheReplace', array( $title, $text ) );
 
                wfProfileOut( __METHOD__ );
        }
@@ -736,7 +736,7 @@ class MessageCache {
                        $lckey = $wgContLang->lcfirst( $lckey );
                }
 
-               wfRunHooks( 'MessageCache::get', array( &$lckey ) );
+               Hooks::run( 'MessageCache::get', array( &$lckey ) );
 
                if ( ord( $lckey ) < 128 ) {
                        $uckey = ucfirst( $lckey );
@@ -909,7 +909,7 @@ class MessageCache {
                } else {
                        // XXX: This is not cached in process cache, should it?
                        $message = false;
-                       wfRunHooks( 'MessagesPreLoad', array( $title, &$message ) );
+                       Hooks::run( 'MessagesPreLoad', array( $title, &$message ) );
                        if ( $message !== false ) {
                                return $message;
                        }
@@ -1059,6 +1059,7 @@ class MessageCache {
                wfProfileIn( __METHOD__ );
                if ( !$title || !$title instanceof Title ) {
                        global $wgTitle;
+                       wfDebugLog( 'GlobalTitleFail', __METHOD__ . ' called by ' . wfGetAllCallers() . ' with no title set.' );
                        $title = $wgTitle;
                }
                // Sometimes $wgTitle isn't set either...