1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-13 18:14:07 +02:00

Use <script> instead of inline event handler in confirm()

This commit is contained in:
Jakub Vrana
2018-01-12 14:43:55 +01:00
parent da671df728
commit a5ee3451ac
15 changed files with 19 additions and 18 deletions

View File

@@ -125,8 +125,8 @@ if ($adminer->homepage()) {
. "<input type='submit' name='check' value='" . lang('Check') . "'" . on_help("'CHECK TABLE'") . "> "
. "<input type='submit' name='repair' value='" . lang('Repair') . "'" . on_help("'REPAIR 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";
. "<input type='submit' name='truncate' value='" . lang('Truncate') . "'" . on_help($jush == "sqlite" ? "'DELETE'" : "'TRUNCATE" . ($jush == "pgsql" ? "'" : " TABLE'")) . "> " . confirm()
. "<input type='submit' name='drop' value='" . lang('Drop') . "'" . on_help("'DROP TABLE'") . ">" . confirm() . "\n";
$databases = (support("scheme") ? $adminer->schemas() : $adminer->databases());
if (count($databases) != 1 && $jush != "sqlite") {
$db = (isset($_POST["target"]) ? $_POST["target"] : (support("scheme") ? $_GET["ns"] : DB));