diff --git a/lang.php b/lang.php index b9874721..349e833a 100755 --- a/lang.php +++ b/lang.php @@ -5,7 +5,7 @@ include __DIR__ . "/adminer/include/errors.inc.php"; unset($_COOKIE["adminer_lang"]); $_SESSION["lang"] = $_SERVER["argv"][1]; // Adminer functions read language from session if (isset($_SESSION["lang"])) { - if (isset($_SERVER["argv"][2]) || !file_exists($filename)) { + if (isset($_SERVER["argv"][2]) || !file_exists(__DIR__ . "/adminer/lang/$_SESSION[lang].inc.php")) { echo "Usage: php lang.php [lang]\nPurpose: Update adminer/lang/*.inc.php from source code messages.\n"; exit(1); } @@ -69,7 +69,7 @@ foreach (glob(__DIR__ . "/adminer/lang/" . ($_SESSION["lang"] ?: "*") . ".inc.ph } } } - $s = "