mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/CategoryTree
synced 2024-11-27 09:43:06 +00:00
Add modules to ParserOutput
This change adds the modules to the ParserOutput object. The hack with the flag for the OutputPageParserOutput hook is not needed anymore. But this will removed in the separate change If9427bbf114870ec9747670367915e11750c6525 to avoid a caching problem. This change loads the modules on Special:ExpandTemplates if a <categorytree> is in the content. Bug: T212059 Change-Id: I8d2a6d92f45f30495263eea716adb4eeaf7ebfbb
This commit is contained in:
parent
9acd8edf62
commit
ed2ec6459b
|
@ -191,8 +191,11 @@ class Hooks implements
|
|||
$allowMissing = false
|
||||
) {
|
||||
if ( $parser ) {
|
||||
$parserOutput = $parser->getOutput();
|
||||
# flag for use by Hooks::parserOutput
|
||||
$parser->getOutput()->setExtensionData( self::EXTENSION_DATA_FLAG, true );
|
||||
$parserOutput->setExtensionData( self::EXTENSION_DATA_FLAG, true );
|
||||
$parserOutput->addModuleStyles( [ 'ext.categoryTree.styles' ] );
|
||||
$parserOutput->addModules( [ 'ext.categoryTree' ] );
|
||||
}
|
||||
|
||||
$ct = new CategoryTree( $argv );
|
||||
|
|
Loading…
Reference in a new issue