Fixed: Browser language preference's not used when using Google Chrome

Thanks bambeeq

http://laconi.ca/trac/ticket/620
This commit is contained in:
Craig Andrews 2009-07-21 15:10:00 -04:00
parent 4d17c8553c
commit 52d51fad3c

View File

@ -53,7 +53,7 @@ function client_prefered_language($httplang)
if (!empty($httplang[2][$i])) { if (!empty($httplang[2][$i])) {
// if no q default to 1.0 // if no q default to 1.0
$client_langs[$httplang[2][$i]] = $client_langs[$httplang[2][$i]] =
($httplang[6][$i]? (float) $httplang[6][$i] : 1.0); ($httplang[6][$i]? (float) $httplang[6][$i] : 1.0 - ($i*0.01));
} }
if (!empty($httplang[3][$i]) && empty($client_langs[$httplang[3][$i]])) { if (!empty($httplang[3][$i]) && empty($client_langs[$httplang[3][$i]])) {
// if a catchall default 0.01 lower // if a catchall default 0.01 lower