From 8d38e2a8f5443db6470511e9a2f5a9e67e4fedf4 Mon Sep 17 00:00:00 2001 From: Sam Reed Date: Sun, 5 Jun 2011 16:34:09 +0000 Subject: [PATCH] =?utf8?q?*=20(bug=2028897)=20rvparse=20doesn=E2=80=99t=20?= =?utf8?q?seem=20to=20work=20with=20rvsection?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- RELEASE-NOTES-1.19 | 1 + includes/api/ApiParse.php | 10 +++++----- includes/api/ApiQueryRevisions.php | 5 +---- 3 files changed, 7 insertions(+), 9 deletions(-) diff --git a/RELEASE-NOTES-1.19 b/RELEASE-NOTES-1.19 index ea976a7dab..3d0bf2c79a 100644 --- a/RELEASE-NOTES-1.19 +++ b/RELEASE-NOTES-1.19 @@ -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 === diff --git a/includes/api/ApiParse.php b/includes/api/ApiParse.php index 392ec73e57..198083da72 100644 --- a/includes/api/ApiParse.php +++ b/includes/api/ApiParse.php @@ -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 ) { diff --git a/includes/api/ApiQueryRevisions.php b/includes/api/ApiQueryRevisions.php index da8966e81c..d59a6f17eb 100644 --- a/includes/api/ApiQueryRevisions.php +++ b/includes/api/ApiQueryRevisions.php @@ -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 ) { -- 2.20.1