diff --git a/includes/SpecialGadgets.php b/includes/SpecialGadgets.php index 761b1f1f..da113da5 100644 --- a/includes/SpecialGadgets.php +++ b/includes/SpecialGadgets.php @@ -48,10 +48,12 @@ class SpecialGadgets extends SpecialPage { return; } + $services = MediaWikiServices::getInstance(); + $output->disallowUserJs(); $lang = $this->getLanguage(); $langSuffix = ""; - if ( !$lang->equals( MediaWikiServices::getInstance()->getContentLanguage() ) ) { + if ( !$lang->equals( $services->getContentLanguage() ) ) { $langSuffix = "/" . $lang->getCode(); } @@ -62,6 +64,7 @@ class SpecialGadgets extends SpecialPage { : 'viewsource'; $linkRenderer = $this->getLinkRenderer(); + $skinFactory = $services->getSkinFactory(); foreach ( $gadgets as $section => $entries ) { if ( $section !== false && $section !== '' ) { $t = Title::makeTitleSafe( NS_MEDIAWIKI, "Gadget-section-$section$langSuffix" ); @@ -183,7 +186,7 @@ class SpecialGadgets extends SpecialPage { // $requiredSkins can be an array, or true (if all skins are supported) if ( is_array( $requiredSkins ) ) { $skins = []; - $validskins = Skin::getSkinNames(); + $validskins = $skinFactory->getSkinNames(); foreach ( $requiredSkins as $skinid ) { if ( isset( $validskins[$skinid] ) ) { $skins[] = $this->msg( "skinname-$skinid" )->plain();