r52286 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r52285‎ | r52286 | r52287 >
Date:16:07, 22 June 2009
Author:yaron
Status:deferred
Tags:
Comment:
Fixed handling of properties for untranslated languages
Modified paths:
  • /trunk/extensions/SemanticDrilldown/includes/SD_GlobalFunctions.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticDrilldown/includes/SD_GlobalFunctions.php
@@ -7,7 +7,7 @@
88
99 if (!defined('MEDIAWIKI')) die();
1010
11 -define('SD_VERSION','0.5.7');
 11+define('SD_VERSION','0.5.8');
1212
1313 // constants for special properties
1414 define('SD_SP_HAS_FILTER', 1);
@@ -136,13 +136,13 @@
137137 include_once( $sdgIP . '/languages/'. $sdLangClass . '.php' );
138138 }
139139
140 - // fallback if language not supported
141 - if ( !class_exists($sdLangClass)) {
142 - global $sdgContLang;
143 - $sdgLang = $sdgContLang;
144 - } else {
145 - $sdgLang = new $sdLangClass();
146 - }
 140+ // fallback if language not supported
 141+ if ( !class_exists($sdLangClass)) {
 142+ include_once( $sdgIP . '/languages/SD_LanguageEn.php' );
 143+ $sdLangClass = 'SD_LanguageEn';
 144+ }
 145+
 146+ $sdgLang = new $sdLangClass();
147147 }
148148
149149 /**

Status & tagging log