Language selection: Fix missing negation

master
Dennis Neufeld 2017-05-16 18:17:31 +02:00
parent 8fb6a4c34d
commit 9f4491b9be
1 changed files with 1 additions and 1 deletions

View File

@ -56,7 +56,7 @@ if (isset($_GET['lang']) && in_array($_GET['lang'], $AVAILABLE_LANGUAGES)) {
elseif (isset($_COOKIE['language']) && in_array($_COOKIE['language'], $AVAILABLE_LANGUAGES)) { elseif (isset($_COOKIE['language']) && in_array($_COOKIE['language'], $AVAILABLE_LANGUAGES)) {
$_SESSION['mailcow_locale'] = $_COOKIE['language']; $_SESSION['mailcow_locale'] = $_COOKIE['language'];
} }
if (isset($_SESSION['mailcow_locale']) && file_exists($_SERVER['DOCUMENT_ROOT'] . '/lang/lang.'.$_SESSION['mailcow_locale'].'.php')) { if (isset($_SESSION['mailcow_locale']) && !file_exists($_SERVER['DOCUMENT_ROOT'] . '/lang/lang.'.$_SESSION['mailcow_locale'].'.php')) {
$_SESSION['mailcow_locale'] = strtolower(trim($DEFAULT_LANG)); $_SESSION['mailcow_locale'] = strtolower(trim($DEFAULT_LANG));
} }
setcookie('language', $_SESSION['mailcow_locale']); setcookie('language', $_SESSION['mailcow_locale']);