From 1e70b74f4ce6cf083794cd5ef64e208d410803ee Mon Sep 17 00:00:00 2001 From: Jakub Vrana Date: Wed, 21 Dec 2011 22:08:18 -0800 Subject: [PATCH] Ability to disable export --- adminer/include/adminer.inc.php | 2 +- adminer/select.inc.php | 15 +++++++++------ changes.txt | 1 + 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/adminer/include/adminer.inc.php b/adminer/include/adminer.inc.php index 02069492..68009afe 100644 --- a/adminer/include/adminer.inc.php +++ b/adminer/include/adminer.inc.php @@ -523,7 +523,7 @@ username.form['driver'].onchange(); } /** Returns export format options - * @return array + * @return array empty to disable export */ function dumpFormat() { return array('sql' => 'SQL', 'csv' => 'CSV,', 'csv;' => 'CSV;', 'tsv' => 'TSV'); diff --git a/adminer/select.inc.php b/adminer/select.inc.php index ddd237b2..5854783f 100644 --- a/adminer/select.inc.php +++ b/adminer/select.inc.php @@ -407,12 +407,15 @@ if (!$columns) { dumpOutput(); - echo ($output ? html_select("output", $output, $adminer_import["output"]) . " " : ""); - echo html_select("format", $adminer->dumpFormat(), $adminer_import["format"]); - echo " \n"; - echo "\n"; + $format = $adminer->dumpFormat(); + if ($format) { + print_fieldset("export", lang('Export')); + $output = $adminer->dumpOutput(); + echo ($output ? html_select("output", $output, $adminer_import["output"]) . " " : ""); + echo html_select("format", $format, $adminer_import["format"]); + echo " \n"; + echo "\n"; + } } if ($adminer->selectImportPrint()) { print_fieldset("import", lang('Import'), !$rows); diff --git a/changes.txt b/changes.txt index 2086be44..a87aaa6f 100644 --- a/changes.txt +++ b/changes.txt @@ -6,6 +6,7 @@ SET DEFAULT foreign key action Trim table and column names (bug #3405309) Error message with no response from server in AJAX Esc to cancel AJAX request +Ability to disable export (customization) MySQL: set autocommit after connect PostgreSQL: fix alter foreign key PostgreSQL over PDO: connect if the eponymous database does not exist (bug #3391619)