Index: trunk/extensions/FlaggedRevs/business/RevisionReviewForm.php |
— | — | @@ -310,9 +310,12 @@ |
311 | 311 | $editStatus = $article->doEdit( |
312 | 312 | $new_text, $this->getComment(), 0, $baseRevId, $this->user ); |
313 | 313 | |
314 | | - $status = $editStatus->isOK(); |
| 314 | + $status = $editStatus->isOK() ? true : 'review_cannot_undo'; |
315 | 315 | # If this undid one edit by another logged-in user, update user tallies |
316 | | - if ( $status && $newRev->getParentId() == $oldRev->getId() && $newRev->getRawUser() ) { |
| 316 | + if ( $status === true |
| 317 | + && $newRev->getParentId() == $oldRev->getId() |
| 318 | + && $newRev->getRawUser() ) |
| 319 | + { |
317 | 320 | if ( $newRev->getRawUser() != $this->user->getId() ) { // no self-reverts |
318 | 321 | FRUserCounters::incCount( $newRev->getRawUser(), 'revertedEdits' ); |
319 | 322 | } |