r92355 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r92354‎ | r92355 | r92356 >
Date:14:16, 16 July 2011
Author:ialex
Status:ok
Tags:
Comment:
No need to pass the 'parse' option to OutputPage::addWikiMsgArray(), it's already added there. Also changed calls to use OutputPage::addWikiMsg() if possible.
Modified paths:
  • /trunk/extensions/PrefSwitch/SpecialPrefSwitch.php (modified) (history)

Diff [purge]

Index: trunk/extensions/PrefSwitch/SpecialPrefSwitch.php
@@ -172,9 +172,7 @@
173173 }
174174 // Always show a way back
175175 if ( $this->originTitle && $this->originFullUrl ) {
176 - $wgOut->addWikiMsgArray(
177 - 'prefswitch-return', array( $this->originFullUrl, $this->originTitle ), array( 'parse' )
178 - );
 176+ $wgOut->addWikiMsg( 'prefswitch-return', $this->originFullUrl, $this->originTitle );
179177 }
180178 // Set page title
181179 if ( self::isSwitchedOn( $wgUser ) ) {
@@ -252,13 +250,9 @@
253251 $html .= Xml::closeElement( 'form' );
254252 $wgOut->addHtml( $html );
255253 } else {
256 - $wgOut->addWikiMsgArray(
257 - 'prefswitch-main', wfMsgForContent( 'prefswitch-feedbackpage' ), array( 'parse' )
258 - );
 254+ $wgOut->addWikiMsg( 'prefswitch-main', wfMsgForContent( 'prefswitch-feedbackpage' ) );
259255 if ($wgUser->isLoggedIn()) {
260 - $wgOut->addWikiMsgArray(
261 - 'prefswitch-main-logged-changes', array( 'parse' )
262 - );
 256+ $wgOut->addWikiMsg( 'prefswitch-main-logged-changes' );
263257
264258 $oldSkin = 'monobook'; // The skin we are migrating from
265259
@@ -276,9 +270,7 @@
277271 }
278272 }
279273 }
280 - $wgOut->addWikiMsgArray(
281 - 'prefswitch-main-feedback', wfMsgForContent( 'prefswitch-feedbackpage' ), array( 'parse' )
282 - );
 274+ $wgOut->addWikiMsg( 'prefswitch-main-feedback', wfMsgForContent( 'prefswitch-feedbackpage' ) );
283275 $state = self::userState( $wgUser );
284276 switch ( $state ) {
285277 case 'anon':
@@ -305,7 +297,7 @@
306298 break;
307299 }
308300 // Uses prefswitch-main-anon, prefswitch-main-on and prefswitch-main-off
309 - $wgOut->addWikiMsgArray( 'prefswitch-main-' . $state, $parameters, array( 'parse' ) );
 301+ $wgOut->addWikiMsgArray( 'prefswitch-main-' . $state, $parameters );
310302 }
311303 }
312304 }

Status & tagging log