Store current version before authentication and in Editor

This commit is contained in:
Jakub Vrana 2018-02-19 23:02:39 +01:00
parent 0e1d8c67fc
commit 059d6266e2
3 changed files with 9 additions and 6 deletions

View file

@ -25,6 +25,14 @@ if (isset($_GET["file"])) {
include "../adminer/include/functions.inc.php";
if ($_GET["script"] == "version") {
$fp = file_open_lock(get_temp_dir() . "/adminer.version");
if ($fp) {
file_write_unlock($fp, serialize(array("signature" => $_POST["signature"], "version" => $_POST["version"])));
}
exit;
}
global $adminer, $connection, $drivers, $edit_functions, $enum_length, $error, $functions, $grouping, $HTTPS, $inout, $jush, $LANG, $langs, $on_actions, $permanent, $structured_types, $has_token, $token, $translations, $types, $unsigned, $VERSION; // allows including Adminer inside a function
if (!$_SERVER["REQUEST_URI"]) { // IIS 5 compatibility

View file

@ -34,12 +34,6 @@ if ($_GET["script"] == "db") {
} elseif ($_GET["script"] == "kill") {
$connection->query("KILL " . number($_POST["kill"]));
} elseif ($_GET["script"] == "version") {
$fp = file_open_lock(get_temp_dir() . "/adminer.version");
if ($fp) {
file_write_unlock($fp, serialize(array("signature" => $_POST["signature"], "version" => $_POST["version"])));
}
} else { // connect
foreach (count_tables($adminer->databases()) as $db => $val) {
json_row("tables-$db", $val);

View file

@ -2,6 +2,7 @@ Adminer 4.6.2-dev:
Semi-transparent border on table actions
Shorten JSON values in select (bug #594)
Speed up alter table (regression from 4.4.0)
Store current version before authentication and in Editor
PostgreSQL: Fix exporting string default values
PostgreSQL: Fix exporting sequences in PostgreSQL 10
PostgreSQL: Add IF EXISTS to DROP SEQUENCE in export (bug #595)