r95983 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r95982‎ | r95983 | r95984 >
Date:13:40, 1 September 2011
Author:catrope
Status:ok
Tags:
Comment:
RL2: Fix reliance on undocumented behavior of Language::factory( null )
Modified paths:
  • /branches/RL2/extensions/Gadgets/backend/Gadget.php (modified) (history)

Diff [purge]

Index: branches/RL2/extensions/Gadgets/backend/Gadget.php
@@ -139,7 +139,8 @@
140140 }
141141 if ( !$msg->exists() ) {
142142 // Fallback: return the name of the gadget
143 - $lang = Language::factory( $langcode );
 143+ global $wgLang;
 144+ $lang = $langcode === null ? $wgLang : Language::factory( $langcode );
144145 return $lang->ucfirst( $this->name );
145146 }
146147 return $msg->plain();

Status & tagging log