From: Jakub Vrana Date: Tue, 25 Feb 2025 16:07:27 +0000 (+0100) Subject: Hide SQL export if driver doesn't support it X-Git-Tag: v5.0.0~143 X-Git-Url: https://git.joonet.de/?a=commitdiff_plain;h=e327d31a0848350ca9eadfd5c6fe70cbe93e8aea;p=adminer.git Hide SQL export if driver doesn't support it --- diff --git a/adminer/include/adminer.inc.php b/adminer/include/adminer.inc.php index 593c49fe..6fe2601e 100644 --- a/adminer/include/adminer.inc.php +++ b/adminer/include/adminer.inc.php @@ -769,7 +769,7 @@ class Adminer { * @return array empty to disable export */ function dumpFormat() { - return array('sql' => 'SQL', 'csv' => 'CSV,', 'csv;' => 'CSV;', 'tsv' => 'TSV'); + return (support("dump") ? array('sql' => 'SQL') : array()) + array('csv' => 'CSV,', 'csv;' => 'CSV;', 'tsv' => 'TSV'); } /** Export database structure @@ -1011,9 +1011,7 @@ bodyLoad('" . lang('SQL command') . ""; $actions[] = "" . lang('Import') . ""; } - if (support("dump")) { - $actions[] = "" . lang('Export') . ""; - } + $actions[] = "" . lang('Export') . ""; } $in_db = $_GET["ns"] !== "" && !$missing && DB != ""; if ($in_db) {