r35820 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r35819‎ | r35820 | r35821 >
Date:20:32, 3 June 2008
Author:nikerabbit
Status:old
Tags:
Comment:
* When passing invalid or nonexistent language code to wfMsgExt, fallback to English instead of some random interface language we are currently using
Modified paths:
  • /trunk/phase3/includes/GlobalFunctions.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/GlobalFunctions.php
@@ -587,7 +587,8 @@
588588 $langCode = $options['language'];
589589 $validCodes = array_keys( Language::getLanguageNames() );
590590 if( !in_array($options['language'], $validCodes) ) {
591 - $langCode = false;
 591+ # Fallback to en, instead of whatever interface language we might have
 592+ $langCode = 'en';
592593 }
593594 } else {
594595 $forContent = false;

Status & tagging log