Merge "Trigger CategoryTree::setHeaders only if subcategories available"

This commit is contained in:
jenkins-bot 2024-10-10 16:45:10 +00:00 committed by Gerrit Code Review
commit 9399909bf3

View file

@ -323,7 +323,6 @@ class Hooks implements
public function onCategoryViewer__doCategoryQuery( $type, $res ) {
if ( $type === 'subcat' && $res ) {
$this->categoryCache->fillFromQuery( $res );
CategoryTree::setHeaders( RequestContext::getMain()->getOutput() );
}
}
@ -354,6 +353,8 @@ class Hooks implements
$cat = $this->categoryCache->getCategory( $title );
$link = $tree->renderNodeInfo( $title, $cat );
CategoryTree::setHeaders( RequestContext::getMain()->getOutput() );
return false;
}
}