r40776 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r40775‎ | r40776 | r40777 >
Date:08:07, 13 September 2008
Author:shinjiman
Status:old
Tags:
Comment:
* Fixed the HTTP accept language string detection length in LanguageConverter.php, instead of the fixed length language codes.
patch by PhiLiP
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/languages/LanguageConverter.php (modified) (history)

Diff [purge]

Index: trunk/phase3/languages/LanguageConverter.php
@@ -180,7 +180,8 @@
181181 $header = str_replace( '_', '-', strtolower($_SERVER["HTTP_ACCEPT_LANGUAGE"]));
182182 $zh = strstr($header, $pv.'-');
183183 if($zh) {
184 - $pv = substr($zh,0,5);
 184+ $ary = split("[,;]",$zh);
 185+ $pv = $ary[0];
185186 }
186187 }
187188 // don't try to return bad variant
Index: trunk/phase3/RELEASE-NOTES
@@ -197,6 +197,8 @@
198198 * (bug 15544) Wiki not set up message (NoLocalSettings.php) now works for
199199 non-index.php entry pages (e.g. api.php). Patch by Matt Johnston.
200200 * (bug 12284) Special:Preferences now sets a returnto parameter on the link to Special:Userlogin. Patch by Marooned.
 201+* Fixed the HTTP accept language string detection length in
 202+ LanguageConverter.php, instead of the fixed length language codes.
201203
202204
203205 === API changes in 1.14 ===