From 37adf537c97362d4c96ece31c60d55daa0b2bb5a Mon Sep 17 00:00:00 2001 From: Jakub Vrana Date: Tue, 16 Apr 2013 10:37:10 -0700 Subject: [PATCH] Respect checked tables in export filename (bug #3245464) --- adminer/dump.inc.php | 5 ++++- changes.txt | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/adminer/dump.inc.php b/adminer/dump.inc.php index ee3f3d0d..76371a80 100644 --- a/adminer/dump.inc.php +++ b/adminer/dump.inc.php @@ -7,7 +7,10 @@ if ($_POST) { $cookie .= "&$key=" . urlencode($_POST[$key]); } cookie("adminer_export", substr($cookie, 1)); - $ext = dump_headers(($TABLE != "" ? $TABLE : DB), (DB == "" || count((array) $_POST["tables"] + (array) $_POST["data"]) > 1)); + $tables = array_flip((array) $_POST["tables"]) + array_flip((array) $_POST["data"]); + $ext = dump_headers( + (count($tables) == 1 ? key($tables) : DB), + (DB == "" || count($tables) > 1)); $is_sql = ereg('sql', $_POST["format"]); if ($is_sql) { echo "-- Adminer $VERSION " . $drivers[DRIVER] . " dump diff --git a/changes.txt b/changes.txt index ec7f1454..0aa18dc2 100644 --- a/changes.txt +++ b/changes.txt @@ -8,6 +8,7 @@ Clear column name after resetting search (bug #3601200) Explain partitions in SQL query (bug #3600150) Allow loading more data with inline edit (bug #3605531) Stay on the same page after deleting rows (bug #3605845) +Respect checked tables in export filename (bug #3245464) Handle max_input_vars Open database to a new window after selecting it with Ctrl Disable autocapitalize in identifiers on mobile browsers