r55409 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r55408‎ | r55409 | r55410 >
Date:11:09, 21 August 2009
Author:ialex
Status:ok
Tags:
Comment:
Pass revision ID to Parser::parse() since the result will be stored in parser cache and causes empty {{REVISIONID}}, {{REVISIONTIMESTAMP}} set to current timestamp
Some sample result at http://test.wikipedia.org/wiki/FlaggedRevsRevisionID?action=purge
Modified paths:
  • /trunk/extensions/FlaggedRevs/FlaggedRevs.class.php (modified) (history)

Diff [purge]

Index: trunk/extensions/FlaggedRevs/FlaggedRevs.class.php
@@ -648,9 +648,10 @@
649649 if( $currentOutput == false ) {
650650 $rev = Revision::newFromTitle( $article->getTitle() );
651651 $text = $rev ? $rev->getText() : false;
 652+ $id = $rev ? $rev->getId() : null;
652653 $title = $article->getTitle();
653654 $options = self::makeParserOptions();
654 - $currentOutput = $wgParser->parse( $text, $title, $options );
 655+ $currentOutput = $wgParser->parse( $text, $title, $options, /*$lineStart*/true, /*$clearState*/true, $id );
655656 # Might as well save the cache while we're at it
656657 if( $wgEnableParserCache )
657658 $parserCache->save( $currentOutput, $article, $wgUser );

Status & tagging log