r91052 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r91051‎ | r91052 | r91053 >
Date:04:49, 29 June 2011
Author:yaron
Status:deferred
Tags:
Comment:
$parser variable should always get set, to ensure that it can be called by the 'ApprovedRevsRevisionUnapproved' hook
Modified paths:
  • /trunk/extensions/ApprovedRevs/ApprovedRevs_body.php (modified) (history)

Diff [purge]

Index: trunk/extensions/ApprovedRevs/ApprovedRevs_body.php
@@ -151,10 +151,11 @@
152152 */
153153 public static function setApprovedRevID( $title, $rev_id, $is_latest = false ) {
154154 self::saveApprovedRevIDInDB( $title, $rev_id );
155 - // if the revision being approved is definitely the latest
156 - // one, there's no need to call the parser on it
 155+ $parser = new Parser();
 156+
 157+ // If the revision being approved is definitely the latest
 158+ // one, there's no need to call the parser on it.
157159 if ( !$is_latest ) {
158 - $parser = new Parser();
159160 $parser->setTitle( $title );
160161 $article = new Article( $title, $rev_id );
161162 $text = $article->getContent();

Status & tagging log