From 1402236c4beb1a98a447ce258a6f332e8f73987a Mon Sep 17 00:00:00 2001 From: Kevin Israel Date: Tue, 24 Jun 2014 04:43:31 -0400 Subject: [PATCH] Remove use of OutputPage::addParserOutputNoText() Simply clicking "Show preview" on the edit page triggered a deprecation warning. Also removed the wfDeprecated() call from the method, which is still used in a few WMF-deployed extensions without a corresponding open change. Follows-up e8f1fede77c5. Change-Id: I2cfdc84b92cf13478b9f462028d525e4ec14fdf2 --- includes/EditPage.php | 2 +- includes/OutputPage.php | 1 - includes/api/ApiParse.php | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/includes/EditPage.php b/includes/EditPage.php index 98e0ec4b5a..480671a214 100644 --- a/includes/EditPage.php +++ b/includes/EditPage.php @@ -3555,7 +3555,7 @@ HTML $previewHTML = $parserOutput->getText(); $this->mParserOutput = $parserOutput; - $wgOut->addParserOutputNoText( $parserOutput ); + $wgOut->addParserOutputMetadata( $parserOutput ); if ( count( $parserOutput->getWarnings() ) ) { $note .= "\n\n" . implode( "\n\n", $parserOutput->getWarnings() ); diff --git a/includes/OutputPage.php b/includes/OutputPage.php index 612dc329da..a2b8920a49 100644 --- a/includes/OutputPage.php +++ b/includes/OutputPage.php @@ -1627,7 +1627,6 @@ class OutputPage extends ContextSource { * @param ParserOutput $parserOutput */ public function addParserOutputNoText( &$parserOutput ) { - wfDeprecated( __METHOD__, '1.24' ); $this->addParserOutputMetadata( $parserOutput ); } diff --git a/includes/api/ApiParse.php b/includes/api/ApiParse.php index 86ce1f179c..9dc4d03a39 100644 --- a/includes/api/ApiParse.php +++ b/includes/api/ApiParse.php @@ -325,7 +325,7 @@ class ApiParse extends ApiBase { if ( isset( $prop['headitems'] ) || isset( $prop['headhtml'] ) ) { $context = $this->getContext(); $context->setTitle( $titleObj ); - $context->getOutput()->addParserOutputNoText( $p_result ); + $context->getOutput()->addParserOutputMetadata( $p_result ); if ( isset( $prop['headitems'] ) ) { $headItems = $this->formatHeadItems( $p_result->getHeadItems() ); -- 2.20.1