r91363 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r91362‎ | r91363 | r91364 >
Date:18:32, 2 July 2011
Author:aaron
Status:resolved
Tags:
Comment:
Fixed bogus reference to $status var (causes a msg exception later down)
Modified paths:
  • /trunk/extensions/FlaggedRevs/business/RevisionReviewForm.php (modified) (history)

Diff [purge]

Index: trunk/extensions/FlaggedRevs/business/RevisionReviewForm.php
@@ -305,9 +305,14 @@
306306 return 'review_cannot_undo';
307307 }
308308 $baseRevId = $newRev->isCurrent() ? $oldRev->getId() : 0;
309 - $article->doEdit( $new_text, $this->getComment(), 0, $baseRevId, $this->user );
 309+
 310+ # Actually make the edit...
 311+ $editStatus = $article->doEdit(
 312+ $new_text, $this->getComment(), 0, $baseRevId, $this->user );
 313+
 314+ $status = $editStatus->isOK();
310315 # If this undid one edit by another logged-in user, update user tallies
311 - if ( $newRev->getParentId() == $oldRev->getId() && $newRev->getRawUser() ) {
 316+ if ( $status && $newRev->getParentId() == $oldRev->getId() && $newRev->getRawUser() ) {
312317 if ( $newRev->getRawUser() != $this->user->getId() ) { // no self-reverts
313318 FRUserCounters::incCount( $newRev->getRawUser(), 'revertedEdits' );
314319 }

Follow-up revisions

RevisionCommit summaryAuthorDate
r91365Follow-up r91363: we need a msg key on failureaaron18:42, 2 July 2011
r92317REL1_18 FR: r87606, r87617, r87669, r87690, r87700, r90388, r90419, r90741, r...reedy21:53, 15 July 2011

Status & tagging log