From: Chad Horohoe Date: Fri, 9 Jul 2010 12:43:27 +0000 (+0000) Subject: Cleanup to r69191: use addParserOutput() instead of addHtml(), specify current rev... X-Git-Tag: 1.31.0-rc.0~36195 X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/exercices/modifier.php?a=commitdiff_plain;h=6965ca86f981984cd85818addb7a4d94bb9f9b61;p=lhc%2Fweb%2Fwiklou.git Cleanup to r69191: use addParserOutput() instead of addHtml(), specify current rev on Article, use doViewParse() so we can cache the ParserOutput --- diff --git a/includes/diff/DifferenceInterface.php b/includes/diff/DifferenceInterface.php index d44823c4be..490d76ded0 100644 --- a/includes/diff/DifferenceInterface.php +++ b/includes/diff/DifferenceInterface.php @@ -444,11 +444,12 @@ CONTROL; $wgOut->addHTML( "\n\n" ); } } elseif( $pCache ) { - $pOutput = ParserCache::singleton()->get( new Article( $this->mTitle ), $wgUser ); + $article = new Article( $this->mTitle, 0 ); + $pOutput = ParserCache::singleton()->get( $article, $wgUser ); if( $pOutput ) { - $wgOut->addHtml( $pOutput->getText() ); + $wgOut->addParserOutput( $pOutput ); } else { - $wgOut->addWikiTextTidy( $this->mNewtext ); + $article->doViewParse(); } } else { $wgOut->addWikiTextTidy( $this->mNewtext );