mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Gadgets
synced 2024-11-15 03:23:51 +00:00
Remove usage of Skin::getSkinNames()
Bug: T257993 Change-Id: Icc945ce1e3287a3b25152702818e5b2a90232677
This commit is contained in:
parent
404b11c4d1
commit
146545919d
|
@ -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();
|
||||
|
|
Loading…
Reference in a new issue