$details = null;
$request = $this->getRequest();
+ $user = $this->getUser();
$result = $this->page->doRollback(
$request->getVal( 'from' ),
$this->getOutput()->addWikiMsgArray( $errMsg, $errArray );
if ( isset( $details['current'] ) ) {
+ /** @var Revision $current */
$current = $details['current'];
if ( $current->getComment() != '' ) {
throw new ErrorPageError( 'rollbackfailed', $error[0], array_slice( $error, 1 ) );
}
+ /** @var Revision $current */
$current = $details['current'];
$target = $details['target'];
$newId = $details['newid'];
$new = Linker::revUserTools( $target );
$this->getOutput()->addHTML( $this->msg( 'rollback-success' )->rawParams( $old, $new )
->parseAsBlock() );
+
+ if ( $user->getBoolOption( 'watchrollback' ) ) {
+ $user->addWatch( $this->page->getTitle(), WatchedItem::IGNORE_USER_RIGHTS );
+ }
+
$this->getOutput()->returnToMain( false, $this->getTitle() );
if ( !$request->getBool( 'hidediff', false ) &&