1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-12 17:44:07 +02:00

Display help in tooltip

Also rename Analyze to Vacuum outside MySQL
This commit is contained in:
Jakub Vrana
2013-07-19 10:35:31 -07:00
parent b8ece2fb5d
commit a338f9bf58
10 changed files with 65 additions and 41 deletions

View File

@@ -114,17 +114,17 @@ if ($adminer->homepage()) {
echo "</table>\n";
if (!information_schema(DB)) {
$analyze = "<input type='submit' value='" . lang('Analyze') . "'>";
$optimize = "<input type='submit' name='optimize' value='" . lang('Optimize') . "'>";
$vacuum = "<input type='submit' value='" . lang('Vacuum') . "'" . on_help("VACUUM") . "> ";
$optimize = "<input type='submit' name='optimize' value='" . lang('Optimize') . "'" . on_help($jush == "sql" ? "OPTIMIZE TABLE" : "VACUUM OPTIMIZE") . "> ";
echo "<fieldset><legend>" . lang('Selected') . " <span id='selected'></span></legend><div>"
. ($jush == "sqlite" ? $optimize . doc_command("vacuum") . " "
: ($jush == "pgsql" ? $analyze . doc_command("vacuum") . " $optimize" . doc_command("vacuum") . " "
: ($jush == "sql" ? $analyze . doc_command("analyze-table") . " $optimize" . doc_command("optimize-table") . " "
. "<input type='submit' name='check' value='" . lang('Check') . "'>" . doc_command("check-table") . " "
. "<input type='submit' name='repair' value='" . lang('Repair') . "'>" . doc_command("repair-table") . " "
. ($jush == "sqlite" ? $vacuum
: ($jush == "pgsql" ? $vacuum . $optimize
: ($jush == "sql" ? "<input type='submit' value='" . lang('Analyze') . "'" . on_help("ANALYZE TABLE") . "> " . $optimize
. "<input type='submit' name='check' value='" . lang('Check') . "'" . on_help("CHECK TABLE") . "> "
. "<input type='submit' name='repair' value='" . lang('Repair') . "'" . on_help("REPAIR TABLE") . "> "
: "")))
. (support("table") ? "<input type='submit' name='truncate' value='" . lang('Truncate') . "'" . confirm() . ">" . doc_command($jush == "sqlite" ? "delete" : "truncate" . ($jush == "pgsql" ? "" : "-table")) . " " : "")
. "<input type='submit' name='drop' value='" . lang('Drop') . "'" . confirm() . ">" . doc_command("drop-table") . "\n";
. (support("table") ? "<input type='submit' name='truncate' value='" . lang('Truncate') . "'" . confirm() . "" . on_help($jush == "sqlite" ? "DELETE" : "TRUNCATE" . ($jush == "pgsql" ? "" : " TABLE")) . "> " : "")
. "<input type='submit' name='drop' value='" . lang('Drop') . "'" . confirm() . "" . on_help("DROP TABLE") . ">\n";
$databases = (support("scheme") ? schemas() : $adminer->databases());
if (count($databases) != 1 && $jush != "sqlite") {
$db = (isset($_POST["target"]) ? $_POST["target"] : (support("scheme") ? $_GET["ns"] : DB));