r25480 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r25479‎ | r25480 | r25481 >
Date:15:50, 4 September 2007
Author:aaron
Status:old
Tags:
Comment:
*Make $title to pass into parse(), it is taken by reference and throws errors when a field (article->mTitle) goes in on some setups.
Modified paths:
  • /trunk/extensions/FlaggedRevs/FlaggedRevs.php (modified) (history)

Diff [purge]

Index: trunk/extensions/FlaggedRevs/FlaggedRevs.php
@@ -236,9 +236,10 @@
237237 $wgParser->isStable = true;
238238 # Don't show section-edit links, they can be old and misleading
239239 $options->setEditSection(false);
240 - //$options->setEditSection( $id==$article->getLatest() );
 240+ // $options->setEditSection( $id==$article->getLatest() );
241241 # Parse the new body, wikitext -> html
242 - $parserOut = $wgParser->parse( $text, $article->getTitle(), $options, true, true, $id );
 242+ $title = $article->getTitle(); // avoid pass-by-reference error
 243+ $parserOut = $wgParser->parse( $text, $title, $options, true, true, $id );
243244 # Reset $wgParser
244245 $wgParser->isStable = false; // Done!
245246

Status & tagging log