Commit 898e1127 authored by Benoit Mortier's avatar Benoit Mortier
Browse files

Cleaning minor sonar code compliance

Move this trailing comment on the previous empty line

Signed-off-by: default avatarBenoit Mortier <benoit.mortier@opensides.be>
Showing with 10 additions and 5 deletions
+10 -5
......@@ -145,9 +145,12 @@ function al2gt($gettextlangs, $mime)
/* 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. */
$max_lang = NULL; // The lang with the maximum score found
$max_l_score = 0; // The lang score of this lang
$max_c_score = 0; // The char score of this lang
/* The lang with the maximum score found */
$max_lang = NULL;
/* The lang score of this lang */
$max_l_score = 0;
/* The char score of this lang */
$max_c_score = 0;
foreach ($gettextlangs as $gtlang) {
if (!($infos = parse_gettext_lang($gtlang))) {
continue;
......@@ -157,11 +160,13 @@ function al2gt($gettextlangs, $mime)
$lang_score = max_scores($lang_scores, array($lang,$lang.'-'.$country,'*'));
$char_score = max_scores($char_scores, array($char,'*'));
if ($char_score == 0) {
continue; // exclude charsets the user refuses
/* exclude charsets the user refuses */
continue;
}
if (($lang_score > $max_l_score)
|| (($lang_score == $max_l_score) && ($char_score > $max_c_score))) { // if lang scores are equals we compare char scores
|| (($lang_score == $max_l_score) && ($char_score > $max_c_score))) {
/* if lang scores are equals we compare char scores */
$max_l_score = $lang_score;
$max_c_score = $char_score;
$max_lang = $gtlang;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment