1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-08 15:47:00 +02:00

Time out long running database list

This commit is contained in:
Jakub Vrana
2012-08-19 17:12:19 -07:00
parent 5e0038b62d
commit 1f53cd3386
7 changed files with 69 additions and 14 deletions

View File

@@ -31,6 +31,14 @@ if ($_GET["script"] == "db") {
json_row("sum-$key", number_format($val, 0, '.', lang(',')));
}
json_row("");
} elseif ($_GET["script"] == "kill") {
foreach (process_list(false) as $process) {
if (ereg('^/\* Adminer ' . (+$_POST["kill"]) . ' \*/', $process["Info"])) {
$connection->query("KILL $process[Id]");
}
}
} else { // connect
foreach (count_tables($adminer->databases()) as $db => $val) {
json_row("tables-" . js_escape($db), $val);