Display the file sha1 value in the file info page
[lhc/web/wiklou.git] / includes / actions / RollbackAction.php
index 3dc611b..9d336e4 100644 (file)
@@ -41,6 +41,7 @@ class RollbackAction extends FormlessAction {
         * - confirm-rollback-button
         * - rollbackfailed
         * - rollback-missingparam
+        * - rollback-success-notify
         */
 
        /**
@@ -54,7 +55,7 @@ class RollbackAction extends FormlessAction {
                $user = $this->getUser();
                $from = $request->getVal( 'from' );
                $rev = $this->page->getRevision();
-               if ( $from === null || $from === '' ) {
+               if ( $from === null ) {
                        throw new ErrorPageError( 'rollbackfailed', 'rollback-missingparam' );
                }
                if ( !$rev ) {
@@ -123,8 +124,13 @@ class RollbackAction extends FormlessAction {
 
                $old = Linker::revUserTools( $current );
                $new = Linker::revUserTools( $target );
-               $this->getOutput()->addHTML( $this->msg( 'rollback-success' )->rawParams( $old, $new )
-                       ->parseAsBlock() );
+               $this->getOutput()->addHTML(
+                       $this->msg( 'rollback-success' )
+                               ->rawParams( $old, $new )
+                               ->params( $current->getUserText( Revision::FOR_THIS_USER, $user ) )
+                               ->params( $target->getUserText( Revision::FOR_THIS_USER, $user ) )
+                               ->parseAsBlock()
+               );
 
                if ( $user->getBoolOption( 'watchrollback' ) ) {
                        $user->addWatch( $this->page->getTitle(), User::IGNORE_USER_RIGHTS );