mirror of
https://github.com/vrana/adminer.git
synced 2025-08-08 23:57:29 +02:00
Use prefix for cookies
git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@731 7c3ca157-0c34-0410-bff1-cbf682f78f5c
This commit is contained in:
6
lang.php
6
lang.php
@@ -1,9 +1,9 @@
|
||||
<?php
|
||||
error_reporting(E_ALL & ~E_NOTICE);
|
||||
if ($_SERVER["argc"] > 1) {
|
||||
$_COOKIE["lang"] = $_SERVER["argv"][1]; // Adminer functions read language from cookie
|
||||
$_COOKIE["adminer_lang"] = $_SERVER["argv"][1]; // Adminer functions read language from cookie
|
||||
include dirname(__FILE__) . "/adminer/include/lang.inc.php";
|
||||
if ($_SERVER["argc"] != 2 || !isset($langs[$_COOKIE["lang"]])) {
|
||||
if ($_SERVER["argc"] != 2 || !isset($langs[$_COOKIE["adminer_lang"]])) {
|
||||
echo "Usage: php lang.php [lang]\nPurpose: Update adminer/lang/*.inc.php from source code messages.\n";
|
||||
exit(1);
|
||||
}
|
||||
@@ -17,7 +17,7 @@ foreach (array_merge(glob(dirname(__FILE__) . "/adminer/*.php"), glob(dirname(__
|
||||
}
|
||||
}
|
||||
|
||||
foreach (glob(dirname(__FILE__) . "/adminer/lang/" . ($_COOKIE["lang"] ? $_COOKIE["lang"] : "*") . ".inc.php") as $filename) {
|
||||
foreach (glob(dirname(__FILE__) . "/adminer/lang/" . ($_COOKIE["adminer_lang"] ? $_COOKIE["adminer_lang"] : "*") . ".inc.php") as $filename) {
|
||||
$messages = $messages_all;
|
||||
preg_match_all("~^(\\s*)(?:// )?(('(?:[^\\\\']+|\\\\.)*') => .*[^,\n]),?~m", file_get_contents($filename), $matches, PREG_SET_ORDER);
|
||||
$s = "";
|
||||
|
Reference in New Issue
Block a user