]> git.joonet.de Git - adminer.git/commitdiff
Ability to disable export
authorJakub Vrana <jakub@vrana.cz>
Thu, 22 Dec 2011 06:08:18 +0000 (22:08 -0800)
committerJakub Vrana <jakub@vrana.cz>
Thu, 22 Dec 2011 06:08:18 +0000 (22:08 -0800)
adminer/include/adminer.inc.php
adminer/select.inc.php
changes.txt

index 02069492ffedbe87187513c0b49acedb4dc6a765..68009afed81045ef0a23fa9edf73f91456adb316 100644 (file)
@@ -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');
index ddd237b2cf7b6318dc8f61ce24b8a0482d4f6086..5854783fabaa8061152a74a11752e1b5da7b5f95 100644 (file)
@@ -407,12 +407,15 @@ if (!$columns) {
 </div></fieldset>
 <?php
                        }
-                       print_fieldset("export", lang('Export'));
-                       $output = $adminer->dumpOutput();
-                       echo ($output ? html_select("output", $output, $adminer_import["output"]) . " " : "");
-                       echo html_select("format", $adminer->dumpFormat(), $adminer_import["format"]);
-                       echo " <input type='submit' name='export' value='" . lang('Export') . "' onclick='eventStop(event);'>\n";
-                       echo "</div></fieldset>\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 " <input type='submit' name='export' value='" . lang('Export') . "' onclick='eventStop(event);'>\n";
+                               echo "</div></fieldset>\n";
+                       }
                }
                if ($adminer->selectImportPrint()) {
                        print_fieldset("import", lang('Import'), !$rows);
index 2086be4458baa1d0a9657549b2fc5e5c1732496f..a87aaa6fa5e5231761280557d35690190315aa09 100644 (file)
@@ -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)