mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Gadgets
synced 2024-11-27 16:50:00 +00:00
SpecialGadgets: Remove incorrect comment and test for $requiredSkins being true
$requiredSkins is always an array Change-Id: I91bade025a9581c33b99f986e9497299483b8b59
This commit is contained in:
parent
31eef4328d
commit
9b6cfa97a0
|
@ -227,27 +227,24 @@ class SpecialGadgets extends SpecialPage {
|
|||
|
||||
// Portion: Show required skins (optional)
|
||||
$requiredSkins = $gadget->getRequiredSkins();
|
||||
// $requiredSkins can be an array, or true (if all skins are supported)
|
||||
if ( is_array( $requiredSkins ) ) {
|
||||
$skins = [];
|
||||
$validskins = $skinFactory->getSkinNames();
|
||||
foreach ( $requiredSkins as $skinid ) {
|
||||
if ( isset( $validskins[$skinid] ) ) {
|
||||
$skins[] = $this->msg( "skinname-$skinid" )->plain();
|
||||
} else {
|
||||
$skins[] = $skinid;
|
||||
}
|
||||
$skins = [];
|
||||
$validskins = $skinFactory->getSkinNames();
|
||||
foreach ( $requiredSkins as $skinid ) {
|
||||
if ( isset( $validskins[$skinid] ) ) {
|
||||
$skins[] = $this->msg( "skinname-$skinid" )->plain();
|
||||
} else {
|
||||
$skins[] = $skinid;
|
||||
}
|
||||
if ( $skins ) {
|
||||
if ( $needLineBreakAfter ) {
|
||||
$output->addHTML( '<br />' );
|
||||
}
|
||||
$output->addHTML(
|
||||
$this->msg( 'gadgets-required-skins', $lang->commaList( $skins ) )
|
||||
->numParams( count( $skins ) )->parse()
|
||||
);
|
||||
$needLineBreakAfter = true;
|
||||
}
|
||||
if ( $skins ) {
|
||||
if ( $needLineBreakAfter ) {
|
||||
$output->addHTML( '<br />' );
|
||||
}
|
||||
$output->addHTML(
|
||||
$this->msg( 'gadgets-required-skins', $lang->commaList( $skins ) )
|
||||
->numParams( count( $skins ) )->parse()
|
||||
);
|
||||
$needLineBreakAfter = true;
|
||||
}
|
||||
|
||||
// Portion: Show required actions (optional)
|
||||
|
|
Loading…
Reference in a new issue