summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2021-02-05 23:41:32 +0300
committerAndrew Dolgov <[email protected]>2021-02-05 23:41:32 +0300
commit403dca154c6b539de221f9e16174a0fdd0a1e896 (patch)
tree8187096f0e04ecb60440c8551514d990d0e85b2d /lib
parentb4cbc792cc5fbbd5356f91038bf6cf5e67a19e42 (diff)
initial WIP for php8; bump php version requirement to 7.0
Diffstat (limited to 'lib')
-rw-r--r--lib/accept-to-gettext.php16
1 files changed, 8 insertions, 8 deletions
diff --git a/lib/accept-to-gettext.php b/lib/accept-to-gettext.php
index c909497cb..c86a62b2e 100644
--- a/lib/accept-to-gettext.php
+++ b/lib/accept-to-gettext.php
@@ -3,7 +3,7 @@
* accept-to-gettext.inc -- convert information in 'Accept-*' headers to
* gettext language identifiers.
* Copyright (c) 2003, Wouter Verhelst <[email protected]>
- *
+ *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
@@ -33,7 +33,7 @@
* Note that this will send out header information (to be
* RFC2616-compliant), so it must be called before anything is sent to
* the user.
- *
+ *
* Assumptions made:
* * Charset encodings are written the same way as the Accept-Charset
* HTTP header specifies them (RFC2616), except that they're parsed
@@ -46,13 +46,13 @@
* used. "en.ISO-8859-15" is OK, though.
* * The language is more important than the charset; i.e., if the
* following is given:
- *
+ *
* Accept-Language: nl-be, nl;q=0.8, en-us;q=0.5, en;q=0.3
* Accept-Charset: ISO-8859-15, utf-8;q=0.5
*
* And the supplied parameter contains (amongst others) nl_BE.UTF-8
* and nl.ISO-8859-15, then nl_BE.UTF-8 will be picked.
- *
+ *
* $Log: accept-to-gettext.inc,v $
* Revision 1.1.1.1 2003/11/19 19:31:15 wouter
* * moved to new CVS repo after death of the old
@@ -93,7 +93,7 @@ function al2gt($gettextlangs, $mime) {
$_SERVER["HTTP_ACCEPT_CHARSET"]);
$alparts=@preg_split("/,/",$acceptLang);
$acparts=@preg_split("/,/",$acceptChar);
-
+
/* Parse the contents of the Accept-Language header.*/
foreach($alparts as $part) {
$part=trim($part);
@@ -112,7 +112,7 @@ function al2gt($gettextlangs, $mime) {
* all character sets not explicitly mentioned get a quality value of
* 0, except for ISO-8859-1, which gets a quality value of 1 if not
* explicitly mentioned.''
- *
+ *
* Making it 2 for the time being, so that we
* can distinguish between "not specified" and "specified as 1" later
* on. */
@@ -132,7 +132,7 @@ function al2gt($gettextlangs, $mime) {
$acscores["ISO-8859-1"]=(isset($acscores["*"])?$acscores["*"]:1);
}
- /*
+ /*
* Loop through the available languages/encodings, and pick the one
* with the highest score, excluding the ones with a charset the user
* did not include.
@@ -171,7 +171,7 @@ function al2gt($gettextlangs, $mime) {
/* We must re-parse the gettext-string now, since we may have found it
* through a "*" qualifier.*/
-
+
$gtparts=@preg_split("/\./",$curgtlang);
$tmp=strtolower($gtparts[0]);
$lang=preg_replace("/\_/", "-", $tmp);