]> git.joonet.de Git - adminer.git/commitdiff
Respect checked tables in export filename (bug #3245464)
authorJakub Vrana <jakub@vrana.cz>
Tue, 16 Apr 2013 17:37:10 +0000 (10:37 -0700)
committerJakub Vrana <jakub@vrana.cz>
Tue, 16 Apr 2013 17:37:10 +0000 (10:37 -0700)
adminer/dump.inc.php
changes.txt

index ee3f3d0ddbd8656a055e0ba80a74301ae139c19c..76371a80572f6e213ac2badacc17c656e7f8d628 100644 (file)
@@ -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
index ec7f1454cbd0ba2666619980e2b55b043f5561d6..0aa18dc22d37d56c017c782279ce3393a0e31267 100644 (file)
@@ -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