Skip to content

Commit

Permalink
#943: Removed duplicated detect language code.
Browse files Browse the repository at this point in the history
  • Loading branch information
abpai94 authored and davidcoutadeur committed Sep 23, 2024
1 parent 00c7d7d commit 38056df
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 39 deletions.
3 changes: 1 addition & 2 deletions htdocs/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,11 @@
#==============================================================================
# Language
#==============================================================================
require_once("../lib/detectbrowserlanguage.php");
# Available languages
$files = glob("../lang/*.php");
$languages = str_replace(".inc.php", "", $files);
$languages = str_replace("../lang/", "", $languages);
$lang = detectLanguage($lang, $allowed_lang ? array_intersect($languages,$allowed_lang) : $languages);
$lang = \Ltb\Language::detect_language($lang, $allowed_lang ? array_intersect($languages,$allowed_lang) : $languages);
require_once("../lang/$lang.inc.php");

# Remove default questions
Expand Down
37 changes: 0 additions & 37 deletions lib/detectbrowserlanguage.php

This file was deleted.

0 comments on commit 38056df

Please sign in to comment.