diff --git a/adminer/db.inc.php b/adminer/db.inc.php index 5bedeae0..0987525b 100644 --- a/adminer/db.inc.php +++ b/adminer/db.inc.php @@ -151,18 +151,23 @@ if (adminer()->homepage()) { . " " . on_help(JUSH == "sqlite" ? "'DELETE'" : "'TRUNCATE" . (JUSH == "pgsql" ? "'" : " TABLE'")) . confirm() . "" . on_help("'DROP TABLE'") . confirm() . "\n"; $databases = (support("scheme") ? adminer()->schemas() : adminer()->databases()); + echo "\n"; + $script = ""; if (count($databases) != 1 && JUSH != "sqlite") { + echo "
" . lang('Move to other database') . "
"; $db = (isset($_POST["target"]) ? $_POST["target"] : (support("scheme") ? $_GET["ns"] : DB)); - echo "

"; echo (support("copy") ? " " . checkbox("overwrite", 1, $_POST["overwrite"], lang('overwrite')) : ""); - echo "\n"; + echo "

\n"; + $script = " selectCount('selected3', formChecked(this, /^(tables|views)\[/));"; } echo ""; // used by trCheck() - echo script("qsl('input').onclick = function () { selectCount('selected', formChecked(this, /^(tables|views)\[/));" . (support("table") ? " selectCount('selected2', formChecked(this, /^tables\[/) || $tables);" : "") . " }"); + echo script("qsl('input').onclick = function () { selectCount('selected', formChecked(this, /^(tables|views)\[/));" + . (support("table") ? " selectCount('selected2', formChecked(this, /^tables\[/) || $tables);" : "") + . "$script }" + ); echo input_token(); - echo "\n"; echo "\n"; } echo "\n";