Index: trunk/extensions/FlaggedRevs/business/RevisionReviewForm.php |
— | — | @@ -305,9 +305,14 @@ |
306 | 306 | return 'review_cannot_undo'; |
307 | 307 | } |
308 | 308 | $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(); |
310 | 315 | # 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() ) { |
312 | 317 | if ( $newRev->getRawUser() != $this->user->getId() ) { // no self-reverts |
313 | 318 | FRUserCounters::incCount( $newRev->getRawUser(), 'revertedEdits' ); |
314 | 319 | } |