X-Git-Url: http://git.cyclocoop.org/?a=blobdiff_plain;f=includes%2Factions%2FRollbackAction.php;h=76d70d70aff16929c1566641139296c11a2def42;hb=30646afb3688f735dda03f6bf025e3a014577d75;hp=617f1c99981d8a49a552fa3c90cd4914459d3300;hpb=f5d968c6b9521d713e68e9d224cfaaad4ab8a963;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/actions/RollbackAction.php b/includes/actions/RollbackAction.php index 617f1c9998..76d70d70af 100644 --- a/includes/actions/RollbackAction.php +++ b/includes/actions/RollbackAction.php @@ -39,6 +39,7 @@ class RollbackAction extends FormlessAction { $details = null; $request = $this->getRequest(); + $user = $this->getUser(); $result = $this->page->doRollback( $request->getVal( 'from' ), @@ -97,6 +98,11 @@ class RollbackAction extends FormlessAction { $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 ) &&