r92618 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r92617‎ | r92618 | r92619 >
Date:10:22, 20 July 2011
Author:ialex
Status:ok
Tags:
Comment:
Use wfMsgExt() instead of OutputPage::addWikiMsgArray() with third parameter
Modified paths:
  • /trunk/extensions/Sudo/SpecialSudo.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Sudo/SpecialSudo.php
@@ -94,10 +94,9 @@
9595 $this->setHeaders();
9696 $s = $wgUser->getSkin();
9797 $suUser = User::newFromId( $_SESSION['wsSudoId'] );
98 - $wgOut->addWikiMsgArray( 'sudo-success', array(
99 - $s->makeLinkObj( $suUser->getUserPage(), htmlspecialchars($suUser->getName()) ),
100 - $s->makeLinkObj( $wgUser->getUserPage(), htmlspecialchars($wgUser->getName()) ) ),
101 - array( 'replaceafter' )
 98+ $wgOut->addHTML( wfMsgExt( 'sudo-success', array( 'parse', 'replaceafter' ),
 99+ $s->makeLinkObj( $suUser->getUserPage(), htmlspecialchars( $suUser->getName() ) ),
 100+ $s->makeLinkObj( $wgUser->getUserPage(), htmlspecialchars( $wgUser->getName() ) ) )
102101 );
103102 }
104103 }
@@ -123,12 +122,11 @@
124123 'action' => $this->getTitle()->getFullURL( 'mode=unsudo' ) ) ) .
125124 Html::Hidden( 'title', $this->getTitle()->getPrefixedText() )
126125 );
127 - $wgOut->addWikiMsgArray( 'sudo-unsudo', array(
128 - $s->makeLinkObj( $suUser->getUserPage(), htmlspecialchars($suUser->getName()) ),
129 - $s->makeLinkObj( $wgUser->getUserPage(), htmlspecialchars($wgUser->getName()) ) ),
130 - array( 'replaceafter' )
131 - );
132126 $wgOut->addHTML(
 127+ wfMsgExt( 'sudo-unsudo', array( 'parse', 'replaceafter' ),
 128+ $s->makeLinkObj( $suUser->getUserPage(), htmlspecialchars( $suUser->getName() ) ),
 129+ $s->makeLinkObj( $wgUser->getUserPage(), htmlspecialchars( $wgUser->getName() ) )
 130+ ) .
133131 Xml::submitButton( wfMsg( 'sudo-unsudo-submit' ) ) .
134132 Xml::closeElement( 'form' )
135133 );

Status & tagging log