Skip to content

Commit

Permalink
ltb-project#943: Removed duplicated detect language code.
Browse files Browse the repository at this point in the history
  • Loading branch information
abpai94 committed Sep 23, 2024
1 parent 3770c4d commit 779a78a
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 40 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"require": {
"ltb-project/ltb-common": "v0.2.1",
"ltb-project/ltb-common": "v0.3.0",
"bjeavons/zxcvbn-php": "^1.0",
"twbs/bootstrap": "v5.3.3",
"defuse/php-encryption": "2.4.0",
Expand Down
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 779a78a

Please sign in to comment.