* Use proper function instead of a global
authorNiklas Laxström <nikerabbit@users.mediawiki.org>
Sat, 13 Oct 2007 11:24:50 +0000 (11:24 +0000)
committerNiklas Laxström <nikerabbit@users.mediawiki.org>
Sat, 13 Oct 2007 11:24:50 +0000 (11:24 +0000)
includes/Skin.php

index f9e1705..2b90bd9 100644 (file)
@@ -156,21 +156,22 @@ class Skin extends Linker {
        }
 
        function initPage( &$out ) {
-               global $wgFavicon, $wgScriptPath, $wgSitename, $wgLanguageCode, $wgLanguageNames;
+               global $wgFavicon, $wgScriptPath, $wgSitename, $wgLanguageCode;
 
-               $fname = 'Skin::initPage';
-               wfProfileIn( $fname );
+               wfProfileIn( __METHOD__ );
 
                if( false !== $wgFavicon ) {
                        $out->addLink( array( 'rel' => 'shortcut icon', 'href' => $wgFavicon ) );
                }
 
+               $names = Language::getLanguageNames();
+
                # OpenSearch description link
                $out->addLink( array( 
                        'rel' => 'search', 
                        'type' => 'application/opensearchdescription+xml',
                        'href' => "$wgScriptPath/opensearch_desc.php",
-                       'title' => "$wgSitename ({$wgLanguageNames[$wgLanguageCode]})",
+                       'title' => "$wgSitename ({$names[$wgLanguageCode]})",
                ));
 
                $this->addMetadataLinks($out);
@@ -179,7 +180,7 @@ class Skin extends Linker {
                
                $this->preloadExistence();
 
-               wfProfileOut( $fname );
+               wfProfileOut( __METHOD__ );
        }
 
        /**