Mass conversion to SpecialPageFactory service
[lhc/web/wiklou.git] / includes / skins / Skin.php
index ff2a9ea..69168c6 100644 (file)
@@ -449,7 +449,8 @@ abstract class Skin extends ContextSource {
                if ( $title->isSpecialPage() ) {
                        $type = 'ns-special';
                        // T25315: provide a class based on the canonical special page name without subpages
-                       list( $canonicalName ) = SpecialPageFactory::resolveAlias( $title->getDBkey() );
+                       list( $canonicalName ) = MediaWikiServices::getInstance()->getSpecialPageFactory()->
+                               resolveAlias( $title->getDBkey() );
                        if ( $canonicalName ) {
                                $type .= ' ' . Sanitizer::escapeClass( "mw-special-$canonicalName" );
                        } else {
@@ -1306,7 +1307,7 @@ abstract class Skin extends ContextSource {
                                [
                                        'checkKeys' => [
                                                // Unless there is both no exact $code override nor an i18n definition
-                                               // in the the software, the only MediaWiki page to check is for $code.
+                                               // in the software, the only MediaWiki page to check is for $code.
                                                $msgCache->getCheckKey( $this->getLanguage()->getCode() )
                                        ],
                                        'lockTSE' => 30
@@ -1526,7 +1527,7 @@ abstract class Skin extends ContextSource {
         *   should fall back to the next notice in its sequence
         */
        private function getCachedNotice( $name ) {
-               global $wgRenderHashAppend, $wgContLang;
+               global $wgRenderHashAppend;
 
                $needParse = false;
 
@@ -1559,12 +1560,13 @@ abstract class Skin extends ContextSource {
                        }
                );
 
+               $contLang = MediaWikiServices::getInstance()->getContentLanguage();
                return Html::rawElement(
                        'div',
                        [
                                'id' => 'localNotice',
-                               'lang' => $wgContLang->getHtmlCode(),
-                               'dir' => $wgContLang->getDir()
+                               'lang' => $contLang->getHtmlCode(),
+                               'dir' => $contLang->getDir()
                        ],
                        $parsed
                );