mirror of
https://github.com/vrana/adminer.git
synced 2026-03-05 03:51:42 +01:00
Store current Adminer version server-side to avoid excessive requests
This commit is contained in:
@@ -34,6 +34,12 @@ 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, $_POST["version"]);
|
||||
}
|
||||
|
||||
} else { // connect
|
||||
foreach (count_tables($adminer->databases()) as $db => $val) {
|
||||
json_row("tables-$db", $val);
|
||||
|
||||
Reference in New Issue
Block a user