http://www.mediawiki.org/wiki/Special:Code/MediaWiki/95983

Revision: 95983
Author:   catrope
Date:     2011-09-01 13:40:42 +0000 (Thu, 01 Sep 2011)
Log Message:
-----------
RL2: Fix reliance on undocumented behavior of Language::factory( null )

Modified Paths:
--------------
    branches/RL2/extensions/Gadgets/backend/Gadget.php

Modified: branches/RL2/extensions/Gadgets/backend/Gadget.php
===================================================================
--- branches/RL2/extensions/Gadgets/backend/Gadget.php  2011-09-01 13:36:28 UTC 
(rev 95982)
+++ branches/RL2/extensions/Gadgets/backend/Gadget.php  2011-09-01 13:40:42 UTC 
(rev 95983)
@@ -139,7 +139,8 @@
                }
                if ( !$msg->exists() ) {
                        // Fallback: return the name of the gadget
-                       $lang = Language::factory( $langcode );
+                       global $wgLang;
+                       $lang = $langcode === null ? $wgLang : 
Language::factory( $langcode );
                        return $lang->ucfirst( $this->name );
                }
                return $msg->plain();


_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to