r15828 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r15827‎ | r15828 | r15829 >
Date:08:33, 26 July 2006
Author:tstarling
Status:old
Tags:
Comment:
Use $wgLang->getCode() instead of $wgLanguageCode for MW>=1.8 compatibility. Works back to about 1.4.
Modified paths:
  • /trunk/extensions/Review/Review.php (modified) (history)
  • /trunk/extensions/StableVersion/StableVersion.php (modified) (history)
  • /trunk/extensions/Tasks/Tasks.php (modified) (history)
  • /trunk/extensions/Watchers/Watchers.php (modified) (history)
  • /trunk/extensions/wikiforum/wikiforum.php (modified) (history)

Diff [purge]

Index: trunk/extensions/StableVersion/StableVersion.php
@@ -95,8 +95,8 @@
9696 // Default language is english
9797 require_once( 'language/en.php' );
9898
99 - global $wgLanguageCode;
100 - $filename = 'language/' . addslashes( $wgLanguageCode ) . '.php';
 99+ global $wgLang;
 100+ $filename = 'language/' . addslashes( $wgLang->getCode() ) . '.php';
101101 // inclusion might fail :p
102102 include( $filename );
103103 }
Index: trunk/extensions/Tasks/Tasks.php
@@ -134,8 +134,8 @@
135135 // Default language is english
136136 require_once('language/en.php');
137137
138 - global $wgLanguageCode;
139 - $filename = 'language/' . addslashes($wgLanguageCode) . '.php' ;
 138+ global $wgLang;
 139+ $filename = 'language/' . addslashes($wgLang->getCode()) . '.php' ;
140140 // inclusion might fail :p
141141 include( $filename );
142142 }
Index: trunk/extensions/Watchers/Watchers.php
@@ -48,8 +48,8 @@
4949 // Default language is english
5050 require_once('language/en.php');
5151
52 - global $wgLanguageCode;
53 - $filename = 'language/' . addslashes($wgLanguageCode) . '.php' ;
 52+ global $wgLang;
 53+ $filename = 'language/' . addslashes($wgLang->getCode()) . '.php' ;
5454 // inclusion might fail :p
5555 include( $filename );
5656 }
@@ -183,4 +183,4 @@
184184 }
185185
186186
187 -?>
\ No newline at end of file
 187+?>
Index: trunk/extensions/Review/Review.php
@@ -82,8 +82,8 @@
8383 // Default language is english
8484 require_once('language/en.php');
8585
86 - global $wgLanguageCode;
87 - $filename = 'language/' . addslashes($wgLanguageCode) . '.php' ;
 86+ global $wgLang;
 87+ $filename = 'language/' . addslashes($wgLang->getCode()) . '.php' ;
8888 // inclusion might fail :p
8989 include( $filename );
9090
Index: trunk/extensions/wikiforum/wikiforum.php
@@ -49,7 +49,7 @@
5050 // Multi-language management
5151 require('language/default.php'); // require the default language file
5252
53 -$lang = 'language/'.$wgLanguageCode;
 53+$lang = 'language/'.$wgLang->getCode();
5454 if($wgUseLatin1)
5555 $lang .= '_latin1';
5656 else