mirror of
https://github.com/vrana/adminer.git
synced 2025-08-16 03:24:01 +02:00
Ability to not export triggers (thanks to paranoiq)
git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@1513 7c3ca157-0c34-0410-bff1-cbf682f78f5c
This commit is contained in:
@@ -68,7 +68,6 @@ SET sql_mode = 'NO_AUTO_VALUE_ON_ZERO';
|
|||||||
|
|
||||||
if ($_POST["table_style"] || $_POST["data_style"]) {
|
if ($_POST["table_style"] || $_POST["data_style"]) {
|
||||||
$views = array();
|
$views = array();
|
||||||
//! defer number of rows to JavaScript
|
|
||||||
foreach (table_status() as $row) {
|
foreach (table_status() as $row) {
|
||||||
$table = (DB == "" || in_array($row["Name"], (array) $_POST["tables"]));
|
$table = (DB == "" || in_array($row["Name"], (array) $_POST["tables"]));
|
||||||
$data = (DB == "" || in_array($row["Name"], (array) $_POST["data"]));
|
$data = (DB == "" || in_array($row["Name"], (array) $_POST["data"]));
|
||||||
@@ -81,7 +80,7 @@ SET sql_mode = 'NO_AUTO_VALUE_ON_ZERO';
|
|||||||
if ($data) {
|
if ($data) {
|
||||||
dump_data($row["Name"], $_POST["data_style"]);
|
dump_data($row["Name"], $_POST["data_style"]);
|
||||||
}
|
}
|
||||||
if ($table) {
|
if ($_POST["triggers"]) {
|
||||||
dump_triggers($row["Name"], $_POST["table_style"]);
|
dump_triggers($row["Name"], $_POST["table_style"]);
|
||||||
}
|
}
|
||||||
if ($ext == "tar") {
|
if ($ext == "tar") {
|
||||||
@@ -164,17 +163,16 @@ parse_str($_COOKIE["adminer_export"], $row);
|
|||||||
if (!$row) {
|
if (!$row) {
|
||||||
$row = array("output" => "text", "format" => "sql", "db_style" => (DB != "" ? "" : "CREATE"), "table_style" => "DROP+CREATE", "data_style" => "INSERT");
|
$row = array("output" => "text", "format" => "sql", "db_style" => (DB != "" ? "" : "CREATE"), "table_style" => "DROP+CREATE", "data_style" => "INSERT");
|
||||||
}
|
}
|
||||||
|
$checked = ($_GET["dump"] == "");
|
||||||
echo "<tr><th>" . lang('Output') . "<td>" . $adminer->dumpOutput(0, $row["output"]) . "\n";
|
echo "<tr><th>" . lang('Output') . "<td>" . $adminer->dumpOutput(0, $row["output"]) . "\n";
|
||||||
echo "<tr><th>" . lang('Format') . "<td>" . $adminer->dumpFormat(0, $row["format"]) . "\n";
|
echo "<tr><th>" . lang('Format') . "<td>" . $adminer->dumpFormat(0, $row["format"]) . "\n";
|
||||||
echo "<tr><th>" . lang('Database') . "<td>" . html_select('db_style', $db_style, $row["db_style"]);
|
echo "<tr><th>" . lang('Database') . "<td>" . html_select('db_style', $db_style, $row["db_style"])
|
||||||
$checked = ($_GET["dump"] == "");
|
. (support("routine") ? checkbox("routines", 1, $checked, lang('Routines')) : "")
|
||||||
if (support("routine")) {
|
. (support("event") ? checkbox("events", 1, $checked, lang('Events')) : "")
|
||||||
echo checkbox("routines", 1, $checked, lang('Routines'));
|
;
|
||||||
}
|
echo "<tr><th>" . lang('Tables') . "<td>" . html_select('table_style', $table_style, $row["table_style"])
|
||||||
if (support("event")) {
|
. (support("trigger") ? checkbox("triggers", 1, $row["table_style"], lang('Triggers')) : "")
|
||||||
echo checkbox("events", 1, $checked, lang('Events'));
|
;
|
||||||
}
|
|
||||||
echo "<tr><th>" . lang('Tables') . "<td>" . html_select('table_style', $table_style, $row["table_style"]);
|
|
||||||
echo "<tr><th>" . lang('Data') . "<td>" . html_select('data_style', $data_style, $row["data_style"]);
|
echo "<tr><th>" . lang('Data') . "<td>" . html_select('data_style', $data_style, $row["data_style"]);
|
||||||
?>
|
?>
|
||||||
</table>
|
</table>
|
||||||
@@ -190,6 +188,7 @@ if (DB != "") {
|
|||||||
echo "<th style='text-align: right;'><label>" . lang('Data') . "<input type='checkbox' id='check-data'$checked onclick='formCheck(this, /^data\\[/);'></label>";
|
echo "<th style='text-align: right;'><label>" . lang('Data') . "<input type='checkbox' id='check-data'$checked onclick='formCheck(this, /^data\\[/);'></label>";
|
||||||
echo "</thead>\n";
|
echo "</thead>\n";
|
||||||
$views = "";
|
$views = "";
|
||||||
|
//! defer number of rows to JavaScript
|
||||||
foreach (table_status() as $row) {
|
foreach (table_status() as $row) {
|
||||||
$name = $row["Name"];
|
$name = $row["Name"];
|
||||||
$prefix = ereg_replace("_.*", "", $name);
|
$prefix = ereg_replace("_.*", "", $name);
|
||||||
|
Reference in New Issue
Block a user