mirror of
https://gerrit.wikimedia.org/r/mediawiki/skins/MinervaNeue
synced 2024-12-01 09:16:34 +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();
|
$services = MediaWikiServices::getInstance();
|
||||||
/** @var \MediaWiki\Minerva\Menu\PageActions\PageActionsDirector $pageActionsDirector */
|
/** @var \MediaWiki\Minerva\Menu\PageActions\PageActionsDirector $pageActionsDirector */
|
||||||
$pageActionsDirector = $services->getService( 'Minerva.Menu.PageActionsDirector' );
|
$pageActionsDirector = $services->getService( 'Minerva.Menu.PageActionsDirector' );
|
||||||
$sidebar = $this->buildSidebarCached();
|
$sidebar = $this->buildSidebar();
|
||||||
$actions = $nav['actions'] ?? [];
|
$actions = $nav['actions'] ?? [];
|
||||||
return $pageActionsDirector->buildMenu( $sidebar['TOOLBOX'], $actions );
|
return $pageActionsDirector->buildMenu( $sidebar['TOOLBOX'], $actions );
|
||||||
}
|
}
|
||||||
|
@ -163,7 +163,7 @@ class SkinMinerva extends SkinMustache {
|
||||||
'html-minerva-user-notifications' => $this->prepareUserNotificationsButton( $this->getNewtalks() ),
|
'html-minerva-user-notifications' => $this->prepareUserNotificationsButton( $this->getNewtalks() ),
|
||||||
'data-minerva-main-menu' => $this->getMainMenu()->getMenuData(
|
'data-minerva-main-menu' => $this->getMainMenu()->getMenuData(
|
||||||
$nav,
|
$nav,
|
||||||
$this->buildSidebarCached()
|
$this->buildSidebar()
|
||||||
)['items'],
|
)['items'],
|
||||||
'html-minerva-tagline' => $this->getTaglineHtml(),
|
'html-minerva-tagline' => $this->getTaglineHtml(),
|
||||||
'html-minerva-post-heading' => $this->isTalkPageWithViewAction()
|
'html-minerva-post-heading' => $this->isTalkPageWithViewAction()
|
||||||
|
@ -785,17 +785,6 @@ class SkinMinerva extends SkinMustache {
|
||||||
return $buttons;
|
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
|
* @inheritDoc
|
||||||
* @return array
|
* @return array
|
||||||
|
|
Loading…
Reference in a new issue