mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/CategoryTree
synced 2024-11-27 17:51:00 +00:00
4bc230093f
The CategoryTree::setHeaders() method adds modules to OutputPage. It does not matter if setHeaders() gets called several times. The previous code tried to avoid to call setHeaders() several times. If wgCategoryTreeForceHeaders is set then the modules get loaded by the hooks "BeforePageDisplay" or "BeforePageDisplayMobile" on every page. In this case duplicate calls of setHeaders() are (partly) avoided by not calling setHeaders() on other hooks. This change removes this micro optimization and loads the modules unconditionally if a category tree is added on a hook. shouldForceHeaders() is now inlined. Change-Id: Ic9219575a714886b4edd446efde2a330dff4dee6 |
||
---|---|---|
.. | ||
ApiCategoryTree.php | ||
CategoryTree.php | ||
CategoryTreeCategoryPage.php | ||
CategoryTreeCategoryViewer.php | ||
CategoryTreeHidePrefix.php | ||
CategoryTreeMode.php | ||
CategoryTreePage.php | ||
ConfigHookHandler.php | ||
Hooks.php |