r112671 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r112670‎ | r112671 | r112672 >
Date:08:40, 29 February 2012
Author:nikerabbit
Status:ok
Tags:
Comment:
Get the default language in a way that also works for anonymous users.
Modified paths:
  • /trunk/extensions/Translate/specials/SpecialTranslate.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Translate/specials/SpecialTranslate.php
@@ -168,13 +168,13 @@
169169 }
170170
171171 protected function setup( $parameters ) {
172 - global $wgUser, $wgRequest;
 172+ global $wgUser, $wgRequest, $wgLang;
173173
174174 $defaults = array(
175175 /* str */ 'taction' => 'translate',
176176 /* str */ 'task' => 'untranslated',
177177 /* str */ 'sort' => 'normal',
178 - /* str */ 'language' => $wgUser->getOption( 'language' ),
 178+ /* str */ 'language' => $wgLang->getCode(),
179179 /* str */ 'group' => '',
180180 /* int */ 'offset' => 0,
181181 /* int */ 'limit' => 100,

Status & tagging log