diff --git a/adminer/dump.inc.php b/adminer/dump.inc.php
index cc67e9ff..28a2d8a7 100644
--- a/adminer/dump.inc.php
+++ b/adminer/dump.inc.php
@@ -68,7 +68,6 @@ SET sql_mode = 'NO_AUTO_VALUE_ON_ZERO';
if ($_POST["table_style"] || $_POST["data_style"]) {
$views = array();
- //! defer number of rows to JavaScript
foreach (table_status() as $row) {
$table = (DB == "" || in_array($row["Name"], (array) $_POST["tables"]));
$data = (DB == "" || in_array($row["Name"], (array) $_POST["data"]));
@@ -81,7 +80,7 @@ SET sql_mode = 'NO_AUTO_VALUE_ON_ZERO';
if ($data) {
dump_data($row["Name"], $_POST["data_style"]);
}
- if ($table) {
+ if ($_POST["triggers"]) {
dump_triggers($row["Name"], $_POST["table_style"]);
}
if ($ext == "tar") {
@@ -164,17 +163,16 @@ parse_str($_COOKIE["adminer_export"], $row);
if (!$row) {
$row = array("output" => "text", "format" => "sql", "db_style" => (DB != "" ? "" : "CREATE"), "table_style" => "DROP+CREATE", "data_style" => "INSERT");
}
+$checked = ($_GET["dump"] == "");
echo "
" . lang('Output') . " | " . $adminer->dumpOutput(0, $row["output"]) . "\n";
echo " |
---|
" . lang('Format') . " | " . $adminer->dumpFormat(0, $row["format"]) . "\n";
-echo " |
---|
" . lang('Database') . " | " . html_select('db_style', $db_style, $row["db_style"]);
-$checked = ($_GET["dump"] == "");
-if (support("routine")) {
- echo checkbox("routines", 1, $checked, lang('Routines'));
-}
-if (support("event")) {
- echo checkbox("events", 1, $checked, lang('Events'));
-}
-echo " |
---|
" . lang('Tables') . " | " . html_select('table_style', $table_style, $row["table_style"]);
+echo " |
---|
" . lang('Database') . " | " . html_select('db_style', $db_style, $row["db_style"])
+ . (support("routine") ? checkbox("routines", 1, $checked, lang('Routines')) : "")
+ . (support("event") ? checkbox("events", 1, $checked, lang('Events')) : "")
+;
+echo " |
---|
" . lang('Tables') . " | " . html_select('table_style', $table_style, $row["table_style"])
+ . (support("trigger") ? checkbox("triggers", 1, $row["table_style"], lang('Triggers')) : "")
+;
echo " |
---|
" . lang('Data') . " | " . html_select('data_style', $data_style, $row["data_style"]);
?>
@@ -190,6 +188,7 @@ if (DB != "") {
echo " | ";
echo "\n";
$views = "";
+ //! defer number of rows to JavaScript
foreach (table_status() as $row) {
$name = $row["Name"];
$prefix = ereg_replace("_.*", "", $name);
|
---|