From 740ae10a3d3fe94e63e6788429ad0d408bef615d Mon Sep 17 00:00:00 2001 From: Jakub Vrana Date: Tue, 8 Mar 2011 13:43:05 +0100 Subject: [PATCH] Don't send incomplete forms --- adminer/call.inc.php | 2 +- adminer/create.inc.php | 2 +- adminer/database.inc.php | 2 +- adminer/db.inc.php | 3 ++- adminer/edit.inc.php | 12 ++++++------ adminer/event.inc.php | 2 +- adminer/include/adminer.inc.php | 2 +- adminer/include/connect.inc.php | 3 ++- adminer/indexes.inc.php | 2 +- adminer/procedure.inc.php | 4 ++-- adminer/processlist.inc.php | 2 +- adminer/scheme.inc.php | 2 +- adminer/select.inc.php | 5 +++-- adminer/sequence.inc.php | 2 +- adminer/sql.inc.php | 7 +++---- adminer/trigger.inc.php | 4 ++-- adminer/type.inc.php | 2 +- adminer/user.inc.php | 2 +- adminer/view.inc.php | 2 +- editor/include/adminer.inc.php | 2 +- 20 files changed, 33 insertions(+), 31 deletions(-) diff --git a/adminer/call.inc.php b/adminer/call.inc.php index eb3a1bb6..0620b441 100644 --- a/adminer/call.inc.php +++ b/adminer/call.inc.php @@ -72,6 +72,6 @@ if ($in) { } ?>

- + diff --git a/adminer/create.inc.php b/adminer/create.inc.php index 84f06bdc..8843cfa3 100644 --- a/adminer/create.inc.php +++ b/adminer/create.inc.php @@ -161,9 +161,9 @@ foreach ($engines as $engine) { ' : ''); ?>

- > + "(" . lang('collation') . ")") + $collations, $collate) : ""); ?> - \n"; } ?> + diff --git a/adminer/db.inc.php b/adminer/db.inc.php index eaa3bc9a..5738fe2d 100644 --- a/adminer/db.inc.php +++ b/adminer/db.inc.php @@ -73,7 +73,7 @@ if ($adminer->homepage()) { } echo "\n"; if (!information_schema(DB)) { - echo "

" . ($jush == "sql" ? " " : "") . " \n"; // 1 - eventStop + echo "

" . ($jush == "sql" ? " " : "") . " \n"; // 1 - eventStop $databases = (support("scheme") ? schemas() : get_databases()); if (count($databases) != 1 && $jush != "sqlite") { $db = (isset($_POST["target"]) ? $_POST["target"] : (support("scheme") ? $_GET["ns"] : DB)); @@ -83,6 +83,7 @@ if ($adminer->homepage()) { echo (support("copy") ? " " : ""); echo "\n"; } + echo "\n"; } echo "\n"; } diff --git a/adminer/edit.inc.php b/adminer/edit.inc.php index f82e3656..5854b958 100644 --- a/adminer/edit.inc.php +++ b/adminer/edit.inc.php @@ -90,13 +90,7 @@ if ($fields) { } ?>

- -"> - (array) $_POST["check"], "clone" => $_POST["clone"], "all" => $_POST["all"])); -} if ($fields) { echo "\n"; if (!isset($_GET["select"])) { @@ -106,5 +100,11 @@ if ($fields) { echo ($update ? "\n" : ($_POST ? "" : "\n") ); +if (isset($_GET["select"])) { + hidden_fields(array("check" => (array) $_POST["check"], "clone" => $_POST["clone"], "all" => $_POST["all"])); +} ?> +"> + + diff --git a/adminer/event.inc.php b/adminer/event.inc.php index 62eaf7ad..d942a293 100644 --- a/adminer/event.inc.php +++ b/adminer/event.inc.php @@ -47,7 +47,7 @@ if ($_POST) {

- > + diff --git a/adminer/include/adminer.inc.php b/adminer/include/adminer.inc.php index fdb413af..1ac76419 100644 --- a/adminer/include/adminer.inc.php +++ b/adminer/include/adminer.inc.php @@ -739,8 +739,8 @@ DROP PROCEDURE adminer_alter; } } ?> - +

diff --git a/adminer/include/connect.inc.php b/adminer/include/connect.inc.php index 54732b20..e495834a 100644 --- a/adminer/include/connect.inc.php +++ b/adminer/include/connect.inc.php @@ -32,7 +32,7 @@ function connect_error() { $collations = collations(); echo "\n"; echo "\n"; - echo "\n"; + echo "\n"; foreach ($databases as $db) { $root = h(ME) . "db=" . urlencode($db); echo "
 " . lang('Database') . "" . lang('Collation') . "" . lang('Tables') . "
 " . lang('Database') . "" . lang('Collation') . "" . lang('Tables') . "
" . checkbox("db[]", $db, in_array($db, (array) $_POST["db"])); @@ -43,6 +43,7 @@ function connect_error() { } echo "
\n"; echo "

\n"; // 1 - eventStop + echo "\n"; echo "" . lang('Refresh') . "\n"; echo "

\n"; } diff --git a/adminer/indexes.inc.php b/adminer/indexes.inc.php index d5334c6f..13b54fdd 100644 --- a/adminer/indexes.inc.php +++ b/adminer/indexes.inc.php @@ -94,7 +94,7 @@ foreach ($row["indexes"] as $index) { ?>

-

+ diff --git a/adminer/procedure.inc.php b/adminer/procedure.inc.php index 1fab8605..99ab5dcb 100644 --- a/adminer/procedure.inc.php +++ b/adminer/procedure.inc.php @@ -51,8 +51,8 @@ if (isset($_GET["function"])) {

- - > + + diff --git a/adminer/processlist.inc.php b/adminer/processlist.inc.php index 5635ea76..aac3f502 100644 --- a/adminer/processlist.inc.php +++ b/adminer/processlist.inc.php @@ -30,6 +30,6 @@ foreach (get_rows("SHOW FULL PROCESSLIST") as $i => $row) {

result("SELECT @@max_connections")); ?>

- + diff --git a/adminer/scheme.inc.php b/adminer/scheme.inc.php index 980bca42..cb570fe8 100644 --- a/adminer/scheme.inc.php +++ b/adminer/scheme.inc.php @@ -25,11 +25,11 @@ if ($_POST) {

"> - \n"; } ?> +

diff --git a/adminer/select.inc.php b/adminer/select.inc.php index 40b8bfc8..d490cd7a 100644 --- a/adminer/select.inc.php +++ b/adminer/select.inc.php @@ -409,9 +409,10 @@ if (!$columns) { echo "\n"; } print_fieldset("import", lang('Import'), !$rows); - echo " "; + echo " "; echo html_select("separator", array("csv" => "CSV,", "csv;" => "CSV;", "tsv" => "TSV"), $adminer_export["format"], 1); // 1 - select - echo " \n"; + echo " "; + echo "\n"; echo "\n"; $adminer->selectEmailPrint(array_filter($email_fields, 'strlen'), $columns); diff --git a/adminer/sequence.inc.php b/adminer/sequence.inc.php index 502eabff..696819ef 100644 --- a/adminer/sequence.inc.php +++ b/adminer/sequence.inc.php @@ -24,11 +24,11 @@ if ($_POST) {

"> - \n"; } ?> +

diff --git a/adminer/sql.inc.php b/adminer/sql.inc.php index 553f764f..20055b90 100644 --- a/adminer/sql.inc.php +++ b/adminer/sql.inc.php @@ -118,9 +118,8 @@ if (!$error && $_POST) { $export = ", " . lang('Export') . "" + . "" + . " " ; if ($connection2 && preg_match("~^($space|\\()*SELECT\\b~isU", $q) && ($explain = explain($connection2, $q))) { $id = "explain-$commands"; @@ -179,8 +178,8 @@ echo "

" . (ini_bool("file_uploads") ? lang('File upload') . ': + : " maxlength="64">

- - > + + diff --git a/adminer/type.inc.php b/adminer/type.inc.php index 4f30550d..0421d13c 100644 --- a/adminer/type.inc.php +++ b/adminer/type.inc.php @@ -20,7 +20,6 @@ if ($_POST) {

- \n"; @@ -30,4 +29,5 @@ if ($TYPE != "") { echo "

\n"; } ?> +

diff --git a/adminer/user.inc.php b/adminer/user.inc.php index c4f74b52..874b01de 100644 --- a/adminer/user.inc.php +++ b/adminer/user.inc.php @@ -162,7 +162,7 @@ foreach (array( echo "\n"; ?>

- > + diff --git a/adminer/view.inc.php b/adminer/view.inc.php index 0d47b8c5..76e6959a 100644 --- a/adminer/view.inc.php +++ b/adminer/view.inc.php @@ -28,7 +28,7 @@ if ($_POST) {

: " maxlength="64">

- + diff --git a/editor/include/adminer.inc.php b/editor/include/adminer.inc.php index b4c51a30..668f9ba8 100644 --- a/editor/include/adminer.inc.php +++ b/editor/include/adminer.inc.php @@ -505,8 +505,8 @@ ORDER BY ORDINAL_POSITION", null, "") as $row) { //! requires MySQL 5 ?>

- +