Vector should not call BaseTemplate::getToolbox
Because the method will soon be deprecated, and by calling it, it can override hook modification on 'nav_urls' and 'feeds' arrays. Bug: T253416 Depends-On: I3d7aa93bea47131371e58d2cd2e2d81fd1d7421e Depends-On: Iab67e1430d55ef9bbf01bfb4e64dd5e36b954eda Depends-On: I05dae74b5071ffc668c3569566239052575edfb9 Change-Id: I76e3bea5403e3a6994b911017e2254307588499c
This commit is contained in:
parent
b577f8b73c
commit
f4b548250d
|
@ -263,13 +263,7 @@ class VectorTemplate extends BaseTemplate {
|
|||
$skin = $this->getSkin();
|
||||
$portals = $skin->buildSidebar();
|
||||
$props = [];
|
||||
// Force the rendering of the following portals
|
||||
if ( !isset( $portals['TOOLBOX'] ) ) {
|
||||
$portals['TOOLBOX'] = true;
|
||||
}
|
||||
if ( !isset( $portals['LANGUAGES'] ) ) {
|
||||
$portals['LANGUAGES'] = true;
|
||||
}
|
||||
|
||||
// Render portals
|
||||
foreach ( $portals as $name => $content ) {
|
||||
if ( $content === false ) {
|
||||
|
@ -283,8 +277,9 @@ class VectorTemplate extends BaseTemplate {
|
|||
case 'SEARCH':
|
||||
break;
|
||||
case 'TOOLBOX':
|
||||
$toolbox = $portals['TOOLBOX'];
|
||||
$portal = $this->getMenuData(
|
||||
'tb', $this->getToolbox(), self::MENU_TYPE_PORTAL
|
||||
'tb', $toolbox, self::MENU_TYPE_PORTAL
|
||||
);
|
||||
// Run deprecated hooks.
|
||||
$vectorTemplate = $this;
|
||||
|
@ -300,7 +295,7 @@ class VectorTemplate extends BaseTemplate {
|
|||
];
|
||||
break;
|
||||
case 'LANGUAGES':
|
||||
$languages = $skin->getLanguages();
|
||||
$languages = $portals['LANGUAGES'];
|
||||
$portal = $this->getMenuData(
|
||||
'lang',
|
||||
$languages,
|
||||
|
|
Loading…
Reference in New Issue