From 1572841659808528c01a4d14c7e565a1016470f6 Mon Sep 17 00:00:00 2001 From: umherirrender Date: Sun, 7 Oct 2012 19:05:34 +0200 Subject: [PATCH] Simplify code for usertools in RollbackAction Change-Id: Ib550084ca60f54a0c1b1a3d6479fba75bc4f22bf --- includes/actions/RollbackAction.php | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/includes/actions/RollbackAction.php b/includes/actions/RollbackAction.php index 0d9a902727..714bd07ba9 100644 --- a/includes/actions/RollbackAction.php +++ b/includes/actions/RollbackAction.php @@ -96,15 +96,8 @@ class RollbackAction extends FormlessAction { $this->getOutput()->setPageTitle( $this->msg( 'actioncomplete' ) ); $this->getOutput()->setRobotPolicy( 'noindex,nofollow' ); - if ( $current->getUserText() === '' ) { - $old = $this->msg( 'rev-deleted-user' )->escaped(); - } else { - $old = Linker::userLink( $current->getUser(), $current->getUserText() ) - . Linker::userToolLinks( $current->getUser(), $current->getUserText() ); - } - - $new = Linker::userLink( $target->getUser(), $target->getUserText() ) - . Linker::userToolLinks( $target->getUser(), $target->getUserText() ); + $old = Linker::revUserTools( $current ); + $new = Linker::revUserTools( $target ); $this->getOutput()->addHTML( $this->msg( 'rollback-success' )->rawParams( $old, $new )->parseAsBlock() ); $this->getOutput()->returnToMain( false, $this->getTitle() ); -- 2.20.1