diff --git a/adminer/include/design.inc.php b/adminer/include/design.inc.php index 88a295d5..399471cd 100644 --- a/adminer/include/design.inc.php +++ b/adminer/include/design.inc.php @@ -32,7 +32,7 @@ function page_header($title, $error = "", $breadcrumb = array(), $title2 = "") { - + time()) { // 86400 - 1 day in seconds diff --git a/adminer/index.php b/adminer/index.php index b95e657c..38ef5538 100644 --- a/adminer/index.php +++ b/adminer/index.php @@ -7,6 +7,7 @@ * @license https://www.gnu.org/licenses/gpl-2.0.html GNU General Public License, version 2 (one or other) */ +$GLOBALS['project'] = basename(dirname(__FILE__)); include "./include/bootstrap.inc.php"; include "./include/tmpfile.inc.php"; diff --git a/compile.php b/compile.php index f897be75..43769bd8 100755 --- a/compile.php +++ b/compile.php @@ -65,6 +65,7 @@ header("Cache-Control: immutable"); $return = preg_replace('~^if \(isset\(\$_GET\["' . $driver . '"]\)\) \{(.*)^}~ms', '\1', $return); } if (basename($match[2]) != "lang.inc.php" || !$_SESSION["lang"]) { + $return = str_replace('', $project, $return); if (basename($match[2]) == "lang.inc.php") { $return = str_replace('function lang($idf, $number = null) {', 'function lang($idf, $number = null) { if (is_string($idf)) { // compiled version uses numbers, string comes from a plugin @@ -388,6 +389,7 @@ include dirname(__FILE__) . "/adminer/include/driver.inc.php"; $features = array("call" => "routine", "dump", "event", "privileges", "procedure" => "routine", "processlist", "routine", "scheme", "sequence", "status", "trigger", "type", "user" => "privileges", "variables", "view"); $lang_ids = array(); // global variable simplifies usage in a callback function $file = file_get_contents(dirname(__FILE__) . "/$project/index.php"); +$file = preg_replace('/\\$GLOBALS\\[\'project\'\\][^;]+;\\s+/', '', $file); if ($driver) { $_GET[$driver] = true; // to load the driver include_once dirname(__FILE__) . "/adminer/drivers/$driver.inc.php"; diff --git a/editor/index.php b/editor/index.php index 3972bdbf..02610a1c 100644 --- a/editor/index.php +++ b/editor/index.php @@ -7,6 +7,7 @@ * @license https://www.gnu.org/licenses/gpl-2.0.html GNU General Public License, version 2 (one or other) */ +$GLOBALS['project'] = basename(dirname(__FILE__)); include "../adminer/include/bootstrap.inc.php"; $drivers[DRIVER] = lang('Login');