* Fixed the HTTP accept language string detection length in LanguageConverter.php...
authorShinjiman <shinjiman@users.mediawiki.org>
Sat, 13 Sep 2008 08:07:55 +0000 (08:07 +0000)
committerShinjiman <shinjiman@users.mediawiki.org>
Sat, 13 Sep 2008 08:07:55 +0000 (08:07 +0000)
  patch by PhiLiP

RELEASE-NOTES
languages/LanguageConverter.php

index c68068a..a020edc 100644 (file)
@@ -197,6 +197,8 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
 * (bug 15544) Wiki not set up message (NoLocalSettings.php) now works for 
   non-index.php entry pages (e.g. api.php). Patch by Matt Johnston.
 * (bug 12284) Special:Preferences now sets a returnto parameter on the link to Special:Userlogin. Patch by Marooned.
+* Fixed the HTTP accept language string detection length in 
+  LanguageConverter.php, instead of the fixed length language codes.
 
 
 === API changes in 1.14 ===
index 1c3926c..dd69e82 100644 (file)
@@ -180,7 +180,8 @@ class LanguageConverter {
                                $header = str_replace( '_', '-', strtolower($_SERVER["HTTP_ACCEPT_LANGUAGE"]));
                                $zh = strstr($header, $pv.'-');
                                if($zh) {
-                                       $pv = substr($zh,0,5);
+                                       $ary = split("[,;]",$zh);
+                                       $pv = $ary[0];
                                }
                        }
                        // don't try to return bad variant