Export: Remember unchecked objects (regression from 5.0.6)

This commit is contained in:
Jakub Vrana
2026-02-10 11:37:54 +01:00
parent cf1454f7a9
commit f0142f0b8e
2 changed files with 8 additions and 5 deletions

View File

@@ -1,4 +1,5 @@
## Adminer dev
- Export: Remember unchecked objects (regression from 5.0.6)
- PostgreSQL: Order NULL last
## Adminer 5.4.2 (released 2026-02-08)

View File

@@ -4,8 +4,14 @@ namespace Adminer;
$TABLE = $_GET["dump"];
if ($_POST && !$error) {
$default = array("auto_increment" => '');
foreach (array("type", "routine", "event", "trigger") as $support) {
if (support($support)) {
$default[$support . "s"] = '';
}
}
save_settings(
array_intersect_key($_POST, array_flip(array("output", "format", "db_style", "types", "routines", "events", "table_style", "auto_increment", "triggers", "data_style"))),
array_intersect_key($_POST + $default, array_flip(array("output", "format", "db_style", "table_style", "data_style")) + $default),
"adminer_export"
);
$tables = array_flip((array) $_POST["tables"]) + array_flip((array) $_POST["data"]);
@@ -153,10 +159,6 @@ $row = get_settings("adminer_export");
if (!$row) {
$row = array("output" => "text", "format" => "sql", "db_style" => (DB != "" ? "" : "CREATE"), "table_style" => "DROP+CREATE", "data_style" => "INSERT");
}
if (!isset($row["events"])) { // backwards compatibility
$row["routines"] = $row["events"] = ($_GET["dump"] == "");
$row["triggers"] = $row["table_style"];
}
echo "<tr><th>" . lang('Output') . "<td>" . html_radios("output", adminer()->dumpOutput(), $row["output"]) . "\n";