Fix router.php syntax

This commit is contained in:
Miraty 2023-02-19 20:50:20 +01:00
parent d342537a59
commit a95f6203eb

View file

@ -4,7 +4,7 @@ define('CONF', parse_ini_file(__DIR__ . '/config.ini', true, INI_SCANNER_TYPED))
define('DB', new PDO('sqlite:' . CONF['common']['root_path'] . '/db/servnest.db'));
$locale = 'en';
foreach (explode(',', preg_replace('/[A-Z0-9]|q=|;|-|\./', '', $_SERVER['HTTP_ACCEPT_LANGUAGE'] ?? '') as $client_locale)) {
foreach (explode(',', preg_replace('/[A-Z0-9]|q=|;|-|\./', '', $_SERVER['HTTP_ACCEPT_LANGUAGE'] ?? '')) as $client_locale) {
if (in_array($client_locale, array_diff(scandir('locales'), ['..', '.']), true)) {
$locale = $client_locale;
break;