return $status->getErrorsArray();
}
+ // raise error, when the edit is an edit without a new version
+ if ( empty( $status->value['revision'] ) ) {
+ $resultDetails = array( 'current' => $current );
+ return array( array( 'alreadyrolled',
+ htmlspecialchars( $this->mTitle->getPrefixedText() ),
+ htmlspecialchars( $fromP ),
+ htmlspecialchars( $current->getUserText() )
+ ) );
+ }
+
$set = array();
if ( $bot && $guser->isAllowed( 'markbotedits' ) ) {
// Mark all reverted edits as bot
);
}
- if ( !empty( $status->value['revision'] ) ) {
- $revId = $status->value['revision']->getId();
- } else {
- $revId = false;
- }
+ $revId = $status->value['revision']->getId();
wfRunHooks( 'ArticleRollbackComplete', array( $this, $guser, $target, $current ) );