r107510 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r107509‎ | r107510 | r107511 >
Date:19:15, 28 December 2011
Author:ialex
Status:ok
Tags:
Comment:
Use local context to get messages
Modified paths:
  • /trunk/phase3/includes/specials/SpecialBlock.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/specials/SpecialBlock.php
@@ -143,7 +143,7 @@
144144 'required' => true,
145145 'tabindex' => '2',
146146 'options' => self::getSuggestedDurations(),
147 - 'other' => wfMsg( 'ipbother' ),
 147+ 'other' => $this->msg( 'ipbother' )->text(),
148148 ),
149149 'Reason' => array(
150150 'type' => 'selectandother',
@@ -310,7 +310,7 @@
311311 $s = Html::rawElement(
312312 'h2',
313313 array(),
314 - wfMsgExt( 'ipb-otherblocks-header', 'parseinline', count( $otherBlockMessages ) )
 314+ $this->msg( 'ipb-otherblocks-header', count( $otherBlockMessages ) )->parse()
315315 ) . "\n";
316316
317317 $list = '';
@@ -342,16 +342,16 @@
343343 $contribsPage = SpecialPage::getTitleFor( 'Contributions', $this->target->getName() );
344344 $links[] = Linker::link(
345345 $contribsPage,
346 - wfMsgExt( 'ipb-blocklist-contribs', 'escape', $this->target->getName() )
 346+ $this->msg( 'ipb-blocklist-contribs', $this->target->getName() )->escaped()
347347 );
348348 }
349349
350350 # Link to unblock the specified user, or to a blank unblock form
351351 if( $this->target instanceof User ) {
352 - $message = wfMsgExt( 'ipb-unblock-addr', array( 'parseinline' ), $this->target->getName() );
 352+ $message = $this->msg( 'ipb-unblock-addr', $this->target->getName() )->parse();
353353 $list = SpecialPage::getTitleFor( 'Unblock', $this->target->getName() );
354354 } else {
355 - $message = wfMsgExt( 'ipb-unblock', array( 'parseinline' ) );
 355+ $message = $this->msg( 'ipb-unblock' )->parse();
356356 $list = SpecialPage::getTitleFor( 'Unblock' );
357357 }
358358 $links[] = Linker::linkKnown( $list, $message, array() );
@@ -359,7 +359,7 @@
360360 # Link to the block list
361361 $links[] = Linker::linkKnown(
362362 SpecialPage::getTitleFor( 'BlockList' ),
363 - wfMsg( 'ipb-blocklist' )
 363+ $this->msg( 'ipb-blocklist' )->escaped()
364364 );
365365
366366 $user = $this->getUser();
@@ -368,7 +368,7 @@
369369 if ( $user->isAllowed( 'editinterface' ) ) {
370370 $links[] = Linker::link(
371371 Title::makeTitle( NS_MEDIAWIKI, 'Ipbreason-dropdown' ),
372 - wfMsgHtml( 'ipb-edit-dropdown' ),
 372+ $this->msg( 'ipb-edit-dropdown' )->escaped(),
373373 array(),
374374 array( 'action' => 'edit' )
375375 );

Status & tagging log