diff options
author | Brian Evans <grknight@gentoo.org> | 2021-07-19 15:20:22 -0400 |
---|---|---|
committer | Brian Evans <grknight@gentoo.org> | 2021-07-19 15:20:22 -0400 |
commit | 9f092345e6bbecfde8c19e6d1490a6031a35f61f (patch) | |
tree | 2abb2398cd0df686e8608e15097ddc58b8995615 /MLEB/Translate/specials/SpecialAggregateGroups.php | |
parent | OAuth: Update for fixes and security (diff) | |
download | extensions-9f092345e6bbecfde8c19e6d1490a6031a35f61f.tar.gz extensions-9f092345e6bbecfde8c19e6d1490a6031a35f61f.tar.bz2 extensions-9f092345e6bbecfde8c19e6d1490a6031a35f61f.zip |
Update to MLEB 2021.06
Signed-off-by: Brian Evans <grknight@gentoo.org>
Diffstat (limited to 'MLEB/Translate/specials/SpecialAggregateGroups.php')
-rw-r--r-- | MLEB/Translate/specials/SpecialAggregateGroups.php | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/MLEB/Translate/specials/SpecialAggregateGroups.php b/MLEB/Translate/specials/SpecialAggregateGroups.php index 197d2462..afc39032 100644 --- a/MLEB/Translate/specials/SpecialAggregateGroups.php +++ b/MLEB/Translate/specials/SpecialAggregateGroups.php @@ -26,7 +26,7 @@ class SpecialAggregateGroups extends SpecialPage { $this->addHelpLink( 'Help:Extension:Translate/Page translation administration' ); $out = $this->getOutput(); - $out->addModuleStyles( 'ext.translate.special.aggregategroups.styles' ); + $out->addModuleStyles( 'ext.translate.specialpages.styles' ); // Check permissions if ( $this->getUser()->isAllowed( 'translate-manage' ) ) { @@ -48,7 +48,7 @@ class SpecialAggregateGroups extends SpecialPage { $pages[] = $group; } elseif ( $group instanceof AggregateMessageGroup ) { $subgroups = TranslateMetadata::getSubgroups( $group->getId() ); - if ( $subgroups !== false ) { + if ( $subgroups !== null ) { $aggregates[] = $group; } } @@ -168,9 +168,7 @@ class SpecialAggregateGroups extends SpecialPage { return $out; } - /** - * @param array $aggregates - */ + /** @param array $aggregates */ protected function showAggregateGroups( array $aggregates ) { $out = $this->getOutput(); $out->addModules( 'ext.translate.special.aggregategroups' ); @@ -183,11 +181,8 @@ class SpecialAggregateGroups extends SpecialPage { $out->addHTML( $nojs ); - /** - * @var AggregateMessageGroup $group - */ + /** @var AggregateMessageGroup $group */ foreach ( $aggregates as $group ) { - // @phan-suppress-next-line SecurityCheck-XSS $out->addHTML( $this->showAggregateGroup( $group ) ); } @@ -230,7 +225,7 @@ class SpecialAggregateGroups extends SpecialPage { $out = Html::openElement( 'ol', [ 'id' => $id ] ); // Not calling $parent->getGroups() because it has done filtering already - $subgroupIds = TranslateMetadata::getSubgroups( $parent->getId() ); + $subgroupIds = TranslateMetadata::getSubgroups( $parent->getId() ) ?? []; // Get the respective groups and sort them $subgroups = MessageGroups::getGroupsById( $subgroupIds ); |