From: C. Scott Ananian Date: Fri, 26 Oct 2018 17:03:19 +0000 (-0400) Subject: RollbackAction/SpecialUndelete: Use OutputPage::addWikiMsg() where possible X-Git-Tag: 1.34.0-rc.0~3586^2 X-Git-Url: http://git.cyclocoop.org/%28?a=commitdiff_plain;h=efecca619d2659d0080bf64adc147921e024b0d3;p=lhc%2Fweb%2Fwiklou.git RollbackAction/SpecialUndelete: Use OutputPage::addWikiMsg() where possible Gently discourage the unnecessary use of OutputPage::addHTML(). Change-Id: Ibb33c056dee2344e9a7a5955408eb56c753acb7b --- diff --git a/includes/actions/RollbackAction.php b/includes/actions/RollbackAction.php index 7b4126278c..c962e20d22 100644 --- a/includes/actions/RollbackAction.php +++ b/includes/actions/RollbackAction.php @@ -101,8 +101,12 @@ class RollbackAction extends FormlessAction { $current = $data['current']; if ( $current->getComment() != '' ) { - $this->getOutput()->addHTML( $this->msg( 'editcomment' )->rawParams( - Linker::formatComment( $current->getComment() ) )->parse() ); + $this->getOutput()->addWikiMsg( + 'editcomment', + Message::rawParam( + Linker::formatComment( $current->getComment() ) + ) + ); } } diff --git a/includes/specials/SpecialUndelete.php b/includes/specials/SpecialUndelete.php index a93dec0313..15b8054af2 100644 --- a/includes/specials/SpecialUndelete.php +++ b/includes/specials/SpecialUndelete.php @@ -443,8 +443,12 @@ class SpecialUndelete extends SpecialPage { } } - $out->addHTML( $this->msg( 'undelete-revision' )->rawParams( $link )->params( - $time )->rawParams( $userLink )->params( $d, $t )->parse() . '' ); + $out->addWikiMsg( + 'undelete-revision', + Message::rawParam( $link ), $time, + Message::rawParam( $userLink ), $d, $t + ); + $out->addHtml( '' ); if ( !Hooks::run( 'UndeleteShowRevision', [ $this->mTargetObj, $rev ] ) ) { return; @@ -1169,7 +1173,7 @@ class SpecialUndelete extends SpecialPage { } $link = $this->getLinkRenderer()->makeKnownLink( $this->mTargetObj ); - $out->addHTML( $this->msg( 'undeletedpage' )->rawParams( $link )->parse() ); + $out->addWikiMsg( 'undeletedpage', Message::rawParam( $link ) ); } else { $out->setPageTitle( $this->msg( 'undelete-error' ) ); }