From: Sam Reed Date: Sun, 5 Jun 2011 16:34:09 +0000 (+0000) Subject: * (bug 28897) rvparse doesn’t seem to work with rvsection X-Git-Tag: 1.31.0-rc.0~29705 X-Git-Url: http://git.cyclocoop.org/%22.%28%24lien.?a=commitdiff_plain;h=8d38e2a8f5443db6470511e9a2f5a9e67e4fedf4;p=lhc%2Fweb%2Fwiklou.git * (bug 28897) rvparse doesn’t seem to work with rvsection --- 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 ) {