X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2FOutputPage.php;h=f95327a72b4b252c5c1ba6e9463b95359d62f9dc;hb=da4e15e219563899acd565650d3ea5261fed9451;hp=01b450b457d93f55b809d2359b67b8f85cdc1e97;hpb=09cfb1269a9ba2bfdbb775b8ba717d9e64e2f21c;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/OutputPage.php b/includes/OutputPage.php index 01b450b457..f95327a72b 100644 --- a/includes/OutputPage.php +++ b/includes/OutputPage.php @@ -287,11 +287,6 @@ class OutputPage extends ContextSource { */ private $mEnableTOC = false; - /** - * @var bool Whether parser output should contain section edit links - */ - private $mEnableSectionEditLinks = true; - /** * @var string|null The URL to send in a element with rel=license */ @@ -1547,7 +1542,6 @@ class OutputPage extends ContextSource { // Someone is trying to set a bogus pre-$wgUser PO. Check if it has // been changed somehow, and keep it if so. $anonPO = ParserOptions::newFromAnon(); - $anonPO->setEditSection( false ); $anonPO->setAllowUnsafeRawHtml( false ); if ( !$options->matches( $anonPO ) ) { wfLogWarning( __METHOD__ . ': Setting a changed bogus ParserOptions: ' . wfGetAllCallers( 5 ) ); @@ -1561,7 +1555,6 @@ class OutputPage extends ContextSource { // ParserOptions for it. And don't cache this ParserOptions // either. $po = ParserOptions::newFromAnon(); - $po->setEditSection( false ); $po->setAllowUnsafeRawHtml( false ); $po->isBogus = true; if ( $options !== null ) { @@ -1571,7 +1564,6 @@ class OutputPage extends ContextSource { } $this->mParserOptions = ParserOptions::newFromContext( $this->getContext() ); - $this->mParserOptions->setEditSection( false ); $this->mParserOptions->setAllowUnsafeRawHtml( false ); } @@ -1821,7 +1813,7 @@ class OutputPage extends ContextSource { // so that extensions may modify ParserOutput to toggle TOC. // This cannot be moved to addParserOutputText because that is not // called by EditPage for Preview. - if ( $parserOutput->getTOCEnabled() && $parserOutput->getTOCHTML() ) { + if ( $parserOutput->getTOCHTML() ) { $this->mEnableTOC = true; } } @@ -1867,17 +1859,6 @@ class OutputPage extends ContextSource { */ function addParserOutput( $parserOutput, $poOptions = [] ) { $this->addParserOutputMetadata( $parserOutput ); - - // Touch section edit links only if not previously disabled - if ( $parserOutput->getEditSectionTokens() ) { - $parserOutput->setEditSectionTokens( $this->mEnableSectionEditLinks ); - } - if ( !$this->mEnableSectionEditLinks - && !array_key_exists( 'enableSectionEditLinks', $poOptions ) - ) { - $poOptions['enableSectionEditLinks'] = false; - } - $this->addParserOutputText( $parserOutput, $poOptions ); } @@ -3895,7 +3876,7 @@ class OutputPage extends ContextSource { * @deprecated since 1.31, use $poOptions to addParserOutput() instead. */ public function enableSectionEditLinks( $flag = true ) { - $this->mEnableSectionEditLinks = $flag; + wfDeprecated( __METHOD__, '1.31' ); } /** @@ -3904,7 +3885,8 @@ class OutputPage extends ContextSource { * @deprecated since 1.31, use $poOptions to addParserOutput() instead. */ public function sectionEditLinksEnabled() { - return $this->mEnableSectionEditLinks; + wfDeprecated( __METHOD__, '1.31' ); + return true; } /**