lib: Upgrade accept-to-gettext.php from 2003-08-14 to 2007-04-01

http://grep.be/data/accept-to-gettext.inc

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
This commit is contained in:
Anders Kaseorg 2017-01-20 15:03:04 -05:00
parent 526096f06a
commit 8eaad18b8c

View file

@ -63,6 +63,8 @@
* Revision 1.2 2003/08/14 10:23:59 wouter * Revision 1.2 2003/08/14 10:23:59 wouter
* Removed little error in Content-Type header syntaxis. * Removed little error in Content-Type header syntaxis.
* *
* 2007-04-01
* add '@' before use of arrays, to avoid PHP warnings.
*/ */
/* not really important, this one; perhaps I could've put it inline with /* not really important, this one; perhaps I could've put it inline with
@ -147,12 +149,12 @@ function al2gt($gettextlangs, $mime) {
$noct=@preg_split("/-/",$allang); $noct=@preg_split("/-/",$allang);
$testvals=array( $testvals=array(
array($alscores[$allang], $acscores[$gtcs]), array(@$alscores[$allang], @$acscores[$gtcs]),
array($alscores[$noct[0]], $acscores[$gtcs]), array(@$alscores[$noct[0]], @$acscores[$gtcs]),
array($alscores[$allang], $acscores["*"]), array(@$alscores[$allang], @$acscores["*"]),
array($alscores[$noct[0]], $acscores["*"]), array(@$alscores[$noct[0]], @$acscores["*"]),
array($alscores["*"], $acscores[$gtcs]), array(@$alscores["*"], @$acscores[$gtcs]),
array($alscores["*"], $acscores["*"])); array(@$alscores["*"], @$acscores["*"]));
$found=FALSE; $found=FALSE;
foreach($testvals as $tval) { foreach($testvals as $tval) {