mirror of
https://gerrit.wikimedia.org/r/mediawiki/skins/MinervaNeue
synced 2024-11-24 22:25:27 +00:00
Minerva nav_urls are used only when OverflowMenu is present
There is no need to call SkinTemplate::buildNavUrls() as the 'nav_urls' from QuickTemplate are used only when OverlfowMenu is present. There is no need to do that heavy calculation unless we really need it. Change-Id: I003efcdeffe10f6a3a155932a20c09e8f62c747e
This commit is contained in:
parent
4ad1b511c0
commit
f4fa534b9d
|
@ -1026,6 +1026,20 @@ class SkinMinerva extends SkinTemplate {
|
|||
] ) );
|
||||
}
|
||||
|
||||
/**
|
||||
* Unless the OverflowMenu is enabled, Minerva doesn't use nav_urls from QuikcTemplate.
|
||||
* We can skip that heavy operation
|
||||
* @return array
|
||||
*/
|
||||
protected function buildNavUrls() {
|
||||
if ( $this->isAllowedPageAction( SkinOptions::OPTION_OVERFLOW_SUBMENU ) ) {
|
||||
// the OverflowMenu uses nav_urls, use the value from SkinTemplate
|
||||
return parent::buildNavUrls();
|
||||
} else {
|
||||
return [];
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param BaseTemplate $tpl
|
||||
* @return array
|
||||
|
|
Loading…
Reference in a new issue