Remove use of OutputPage::addParserOutputNoText()
authorKevin Israel <pleasestand@live.com>
Tue, 24 Jun 2014 08:43:31 +0000 (04:43 -0400)
committerKevin Israel <pleasestand@live.com>
Tue, 24 Jun 2014 08:53:44 +0000 (04:53 -0400)
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
includes/OutputPage.php
includes/api/ApiParse.php

index 98e0ec4..480671a 100644 (file)
@@ -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() );
index 612dc32..a2b8920 100644 (file)
@@ -1627,7 +1627,6 @@ class OutputPage extends ContextSource {
         * @param ParserOutput $parserOutput
         */
        public function addParserOutputNoText( &$parserOutput ) {
-               wfDeprecated( __METHOD__, '1.24' );
                $this->addParserOutputMetadata( $parserOutput );
        }
 
index 86ce1f1..9dc4d03 100644 (file)
@@ -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() );