* (bug 28897) rvparse doesn’t seem to work with rvsection
authorSam Reed <reedy@users.mediawiki.org>
Sun, 5 Jun 2011 16:34:09 +0000 (16:34 +0000)
committerSam Reed <reedy@users.mediawiki.org>
Sun, 5 Jun 2011 16:34:09 +0000 (16:34 +0000)
RELEASE-NOTES-1.19
includes/api/ApiParse.php
includes/api/ApiQueryRevisions.php

index ea976a7..3d0bf2c 100644 (file)
@@ -95,6 +95,7 @@ production.
 * (bug 29070) Add token to action=watch
 * (bug 29221) Expose oldrevid in watchlist output
 * (bug 29267) always give the servername for meta=siteinfo&siprop=dbrepllag
+* (bug 28897) rvparse doesn’t seem to work with rvsection
 
 === Languages updated in 1.19 ===
 
index 392ec73..198083d 100644 (file)
@@ -297,11 +297,11 @@ class ApiParse extends ApiBase {
        }
 
        /**
-        * @param  $articleObj Article
-        * @param  $titleObj Title
-        * @param  $popts ParserOptions
-        * @param  $pageId Int
-        * @param  $getWikitext Bool
+        * @param $articleObj Article
+        * @param $titleObj Title
+        * @param $popts ParserOptions
+        * @param $pageId Int
+        * @param $getWikitext Bool
         * @return ParserOutput
         */
        private function getParsedSectionOrText( $articleObj, $titleObj, $popts, $pageId = null, $getWikitext = false ) {
index da8966e..d59a6f1 100644 (file)
@@ -482,10 +482,7 @@ class ApiQueryRevisions extends ApiQueryBase {
                                $text = $wgParser->preprocess( $text, $title, new ParserOptions() );
                        }
                        if ( $this->parseContent ) {
-                               $articleObj = new Article( $title );
-
-                               $p_result = $articleObj->getParserOutput();
-                               $text = $p_result->getText();
+                               $text = $wgParser->parse( $text, $title, new ParserOptions() )->getText();
                        }
                        ApiResult::setContent( $vals, $text );
                } elseif ( $this->fld_content ) {