Skip to content

Commit

Permalink
Store current version before authentication and in Editor
Browse files Browse the repository at this point in the history
  • Loading branch information
vrana committed Feb 19, 2018
1 parent 0e1d8c6 commit 059d626
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
8 changes: 8 additions & 0 deletions adminer/include/bootstrap.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,14 @@

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
Expand Down
6 changes: 0 additions & 6 deletions adminer/script.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,6 @@
} 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);
Expand Down
1 change: 1 addition & 0 deletions changes.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 059d626

Please sign in to comment.