Use default ParserOutput::getText() options for injectTOC
We rely on the default settings for `skin` and `injectTOC` set by OutputPage::addParserOutputText(), and so no longer need to explicitly initialize these from the skin options. Bug: T317333 Depends-On: Ica30569efbb5730eff5b807e8fc34beb2e13e74f Change-Id: I5b8ecd1abf87e66bb75d7c26790f9e7c1b3a6da3
This commit is contained in:
parent
6c242a8a11
commit
c0c220e93d
2 changed files with 1 additions and 10 deletions
|
|
@ -1021,11 +1021,8 @@ class DifferenceEngine extends ContextSource {
|
|||
if ( $this->hookRunner->onDifferenceEngineRenderRevisionAddParserOutput(
|
||||
$this, $out, $parserOutput, $wikiPage )
|
||||
) {
|
||||
$skinOptions = $this->getSkin()->getOptions();
|
||||
$out->setSections( $parserOutput->getSections() );
|
||||
$out->addParserOutput( $parserOutput, [
|
||||
// phab:T311529 - diffs should respect skin
|
||||
'injectTOC' => $skinOptions['toc'],
|
||||
'enableSectionEditLinks' => $this->mNewRevisionRecord->isCurrent()
|
||||
&& $this->getAuthority()->probablyCan(
|
||||
'edit',
|
||||
|
|
|
|||
|
|
@ -478,14 +478,8 @@ class Article implements Page {
|
|||
# Allow frames by default
|
||||
$outputPage->setPreventClickjacking( false );
|
||||
|
||||
$skin = $context->getSkin();
|
||||
$skinOptions = $skin->getOptions();
|
||||
|
||||
$parserOptions = $this->getParserOptions();
|
||||
$poOptions = [
|
||||
'skin' => $skin,
|
||||
'injectTOC' => $skinOptions['toc'],
|
||||
];
|
||||
$poOptions = [];
|
||||
# Allow extensions to vary parser options used for article rendering
|
||||
Hooks::runner()->onArticleParserOptions( $this, $parserOptions );
|
||||
# Render printable version, use printable version cache
|
||||
|
|
|
|||
Loading…
Reference in a new issue