r107396 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r107395‎ | r107396 | r107397 >
Date:16:35, 27 December 2011
Author:ialex
Status:ok
Tags:
Comment:
* Use local context to get messages
* Also set the reason for the block in content language
Modified paths:
  • /trunk/phase3/includes/specials/SpecialBlockme.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/specials/SpecialBlockme.php
@@ -44,7 +44,7 @@
4545 return;
4646 }
4747
48 - $user = User::newFromName( wfMsgForContent( 'proxyblocker' ) );
 48+ $user = User::newFromName( $this->msg( 'proxyblocker' )->inContentLanguage()->text() );
4949 # FIXME: newFromName could return false on a badly configured wiki.
5050 if ( !$user->isLoggedIn() ) {
5151 $user->addToDatabase();
@@ -53,7 +53,7 @@
5454 $block = new Block();
5555 $block->setTarget( $ip );
5656 $block->setBlocker( $user );
57 - $block->mReason = wfMsg( 'proxyblockreason' );
 57+ $block->mReason = $this->msg( 'proxyblockreason' )->inContentLanguage()->text();
5858
5959 $block->insert();
6060

Status & tagging log