index f04bb4f0b5a243e8c5b85808c776fef83cf4d587..52647c6606ece6f98932726eaa88c394c248a2b4 100644 (file)
}
-function al2gt($gettextlangs, $mime) {
- error_reporting(0);
+function al2gt($gettextlangs, $mime)
+{
/* default to "everything is acceptable", as RFC2616 specifies */
$acceptLang=(($_SERVER["HTTP_ACCEPT_LANGUAGE"] == '') ? '*' :
$gtcs=strtoupper($tmp2[1]);
$noct=@preg_split("/-/",$allang);
+ if(!isset($alscores["*"])){
+ $alscores["*"] = "";
+ }
+
+ if(!isset($alscores[$allang])){
+ $alscores[$allang] = "";
+ }
+
+ if(!isset($alscores[$noct[0]])){
+ $alscores[$noct[0]] = "";
+ }
+
$testvals=array(
array($alscores[$allang], $acscores[$gtcs]),
array($alscores[$noct[0]], $acscores[$gtcs]),
header("Content-Language: $lang");
header("Content-Type: $mime; charset=$charset");
- error_reporting(E_ALL);
return $curgtlang;
}
+// vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
?>