From: umherirrender Date: Sun, 7 Oct 2012 17:05:34 +0000 (+0200) Subject: Simplify code for usertools in RollbackAction X-Git-Tag: 1.31.0-rc.0~22118 X-Git-Url: https://git.cyclocoop.org/%7B%24admin_url%7Dmembres/fiche.php?a=commitdiff_plain;h=1572841659808528c01a4d14c7e565a1016470f6;p=lhc%2Fweb%2Fwiklou.git Simplify code for usertools in RollbackAction Change-Id: Ib550084ca60f54a0c1b1a3d6479fba75bc4f22bf --- 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() );