* Removed getSelectOptions, which did nothing other than send FOR UPDATE on some...
[lhc/web/wiklou.git] / includes / MessageCache.php
index ed5778d..d907a78 100644 (file)
@@ -440,6 +440,7 @@ class MessageCache {
                wfProfileIn( __METHOD__ );
 
                if ( $this->mDisable ) {
+                       wfProfileOut( __METHOD__ );
                        return;
                }
 
@@ -580,9 +581,7 @@ class MessageCache {
                        throw new MWException( "Bad lang code $langcode given" );
                }
 
-               // Don't change getPreferredVariant() to getCode() / mCode, for
-               // more details, see the comment in Language::getMessage().
-               $langcode = $lang->getPreferredVariant();
+               $langcode = $lang->getCode();
 
                $message = false;
 
@@ -799,8 +798,10 @@ class MessageCache {
        }
 
        public static function logMessages() {
+               wfProfileIn( __METHOD__ );
                global $wgAdaptiveMessageCache;
                if ( !$wgAdaptiveMessageCache || !self::$instance instanceof MessageCache ) {
+                       wfProfileOut( __METHOD__ );
                        return;
                }
 
@@ -833,13 +834,16 @@ class MessageCache {
                }
 
                $cache->set( $cachekey, $data );
+               wfProfileOut( __METHOD__ );
        }
 
        public function getMostUsedMessages() {
+               wfProfileIn( __METHOD__ );
                $cachekey = wfMemcKey( 'message-profiling' );
                $cache = wfGetCache( CACHE_DB );
                $data = $cache->get( $cachekey );
                if ( !$data ) {
+                       wfProfileOut( __METHOD__ );
                        return array();
                }
 
@@ -862,6 +866,7 @@ class MessageCache {
                        }
                }
 
+               wfProfileOut( __METHOD__ );
                return array_keys( $list );
        }