r34546 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r34545‎ | r34546 | r34547 >
Date:01:08, 10 May 2008
Author:aaron
Status:old
Tags:
Comment:
Use getTextForParse()
Modified paths:
  • /trunk/extensions/FlaggedRevs/FlaggedArticle.php (modified) (history)

Diff [purge]

Index: trunk/extensions/FlaggedRevs/FlaggedArticle.php
@@ -176,13 +176,7 @@
177177 // behavior below, since it is the same as ("&stable=1").
178178 if( $old ) {
179179 $revs_since = FlaggedRevs::getRevCountSince( $article, $frev->getRevId() );
180 - global $wgUseStableTemplates;
181 - if( $wgUseStableTemplates ) {
182 - $rev = Revision::newFromId( $frev->getRevId() );
183 - $text = $rev->getText();
184 - } else {
185 - $text = $frev->getExpandedText();
186 - }
 180+ $text = $frev->getTextForParse();
187181 $parserOut = FlaggedRevs::parseStableText( $article, $text, $frev->getRevId() );
188182 # Construct some tagging for non-printable outputs. Note that the pending
189183 # notice has all this info already, so don't do this if we added that already.
@@ -286,13 +280,7 @@
287281 # Get parsed stable version
288282 $parserOut = FlaggedRevs::getPageCache( $article );
289283 if( $parserOut==false ) {
290 - global $wgUseStableTemplates;
291 - if( $wgUseStableTemplates ) {
292 - $rev = Revision::newFromId( $frev->getRevId() );
293 - $text = $rev->getText();
294 - } else {
295 - $text = $frev->getExpandedText();
296 - }
 284+ $text = $frev->getTextForParse();
297285 $parserOut = FlaggedRevs::parseStableText( $article, $text, $frev->getRevId() );
298286 # Update the stable version cache
299287 FlaggedRevs::updatePageCache( $article, $parserOut );

Status & tagging log