Fix missing wikibase link in Minerva sidebar

Bug: T66315
Change-Id: I51c394193ea37ade37c662edd69ac0df4171c1d9
(cherry picked from commit e1b61ec3c5)
This commit is contained in:
joelyrookewmde 2024-09-04 10:21:22 +02:00 committed by Joely Rooke WMDE
parent 90f9366ae7
commit 32bf2d725e

View file

@ -170,6 +170,14 @@ class SkinMinerva extends SkinMustache {
$sidebar = $this->buildSidebar();
$actions = $nav['actions'] ?? [];
$views = $nav['views'] ?? [];
// See T66315: Wikibase link is being moved to the otherprojects sidebar.
// Since the other projects are not displayed in Minerva, we must manually add it back to the toolbox.
$wikibaseLink = array_filter( $sidebar[ 'wikibase-otherprojects' ] ?? [], static function ( $sitelink ) {
return $sitelink[ 'id' ] === 't-wikibase';
} );
if ( $wikibaseLink ) {
$sidebar['TOOLBOX']['wikibase'] = $wikibaseLink[0];
}
return $pageActionsDirector->buildMenu( $sidebar['TOOLBOX'], $actions, $views );
}