X-Git-Url: https://dev.renevier.net/gitweb.cgi?p=syp.git;a=blobdiff_plain;f=inc%2Flangutils.php;h=8a81b9c0f465a73f327e3c785259608011ec298e;hp=5ac4a3766c0ed44b7b18d62dc8294db8d2b8401f;hb=4acc8da49e3d4083fd9906388dd8fe0212bb9f42;hpb=e4a4e5149d55cf01a86f26392c52fdca803654ce diff --git a/inc/langutils.php b/inc/langutils.php index 5ac4a37..8a81b9c 100644 --- a/inc/langutils.php +++ b/inc/langutils.php @@ -30,7 +30,7 @@ function parse_accept_language () { if (preg_match ('/^\s*([a-zA-Z-]+)\s*$/', $acc, $matches)) { $possibilities [$matches [1]] = 1.0; } - if (preg_match ('/^\s*([a-zA-Z-]+)\s*;\s*q\s*=\s*([0-9\.]+)\s*$/', + if (preg_match ('/^\s*([a-zA-Z-]+)\s*;\s*q\s*=\s*([0-9\.]+)\s*$/', $acc, $matches)) { $val = floatval ($matches [2]); if ($val > 1.0) { @@ -55,7 +55,7 @@ function other_languages ($current_lang) { if ($dotpos !== false) { $script = substr ($script, 0, $dotpos); } - + global $translations; $links = Array (); foreach ($translations as $lang => $obj) {