r46949 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r46948‎ | r46949 | r46950 >
Date:22:22, 6 February 2009
Author:yaron
Status:deferred
Tags:
Comment:
Fixed incorrect initialization of content language
Modified paths:
  • /trunk/extensions/SemanticForms/includes/SF_GlobalFunctions.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticForms/includes/SF_GlobalFunctions.php
@@ -7,7 +7,7 @@
88
99 if ( !defined( 'MEDIAWIKI' ) ) die();
1010
11 -define('SF_VERSION','1.5');
 11+define('SF_VERSION','1.5.1');
1212
1313 $wgExtensionCredits['specialpage'][]= array(
1414 'name' => 'Semantic Forms',
@@ -160,15 +160,15 @@
161161 if (!empty($sfgContLang)) { return; }
162162
163163 $cont_lang_class = 'SF_Language' . str_replace( '-', '_', ucfirst( $langcode ) );
 164+ if (file_exists($sfgIP . '/languages/'. $cont_lang_class . '.php')) {
 165+ include_once( $sfgIP . '/languages/'. $cont_lang_class . '.php' );
 166+ }
 167+
164168 // fallback if language not supported
165169 if ( !class_exists($cont_lang_class)) {
166170 $cont_lang_class = 'SF_LanguageEn';
167171 }
168172
169 - if (file_exists($sfgIP . '/languages/'. $cont_lang_class . '.php')) {
170 - include_once( $sfgIP . '/languages/'. $cont_lang_class . '.php' );
171 - }
172 -
173173 $sfgContLang = new $cont_lang_class();
174174 }
175175

Status & tagging log