mirror of
https://gerrit.wikimedia.org/r/mediawiki/skins/MinervaNeue
synced 2024-11-28 08:00:32 +00:00
Move the sidebar cache to core
This cache is unnecessary since I reimplemented it in core. Change-Id: I31e5694bebb3c73b88c11827ff3cd953233269f4
This commit is contained in:
parent
46303db1cd
commit
0bfcad1b1f
|
@ -105,7 +105,7 @@ class SkinMinerva extends SkinMustache {
|
|||
$services = MediaWikiServices::getInstance();
|
||||
/** @var \MediaWiki\Minerva\Menu\PageActions\PageActionsDirector $pageActionsDirector */
|
||||
$pageActionsDirector = $services->getService( 'Minerva.Menu.PageActionsDirector' );
|
||||
$sidebar = $this->buildSidebarCached();
|
||||
$sidebar = $this->buildSidebar();
|
||||
$actions = $nav['actions'] ?? [];
|
||||
return $pageActionsDirector->buildMenu( $sidebar['TOOLBOX'], $actions );
|
||||
}
|
||||
|
@ -163,7 +163,7 @@ class SkinMinerva extends SkinMustache {
|
|||
'html-minerva-user-notifications' => $this->prepareUserNotificationsButton( $this->getNewtalks() ),
|
||||
'data-minerva-main-menu' => $this->getMainMenu()->getMenuData(
|
||||
$nav,
|
||||
$this->buildSidebarCached()
|
||||
$this->buildSidebar()
|
||||
)['items'],
|
||||
'html-minerva-tagline' => $this->getTaglineHtml(),
|
||||
'html-minerva-post-heading' => $this->isTalkPageWithViewAction()
|
||||
|
@ -785,17 +785,6 @@ class SkinMinerva extends SkinMustache {
|
|||
return $buttons;
|
||||
}
|
||||
|
||||
/**
|
||||
* Minerva skin do not have sidebar, there is no need to calculate that.
|
||||
* @return array
|
||||
*/
|
||||
private function buildSidebarCached() {
|
||||
if ( !$this->sidebarCachedResult ) {
|
||||
$this->sidebarCachedResult = $this->buildSidebar();
|
||||
}
|
||||
return $this->sidebarCachedResult;
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
* @return array
|
||||
|
|
Loading…
Reference in a new issue