From: Alexandre Emsenhuber Date: Tue, 27 Dec 2011 16:35:40 +0000 (+0000) Subject: * Use local context to get messages X-Git-Tag: 1.31.0-rc.0~25714 X-Git-Url: http://git.cyclocoop.org/%24href?a=commitdiff_plain;h=9b3e0a7e1133bddd9c44582d0a2f20ba3da76683;p=lhc%2Fweb%2Fwiklou.git * Use local context to get messages * Also set the reason for the block in content language --- diff --git a/includes/specials/SpecialBlockme.php b/includes/specials/SpecialBlockme.php index ebfe07e677..3840b2ffed 100644 --- a/includes/specials/SpecialBlockme.php +++ b/includes/specials/SpecialBlockme.php @@ -44,7 +44,7 @@ class SpecialBlockme extends UnlistedSpecialPage { return; } - $user = User::newFromName( wfMsgForContent( 'proxyblocker' ) ); + $user = User::newFromName( $this->msg( 'proxyblocker' )->inContentLanguage()->text() ); # FIXME: newFromName could return false on a badly configured wiki. if ( !$user->isLoggedIn() ) { $user->addToDatabase(); @@ -53,7 +53,7 @@ class SpecialBlockme extends UnlistedSpecialPage { $block = new Block(); $block->setTarget( $ip ); $block->setBlocker( $user ); - $block->mReason = wfMsg( 'proxyblockreason' ); + $block->mReason = $this->msg( 'proxyblockreason' )->inContentLanguage()->text(); $block->insert();