1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-21 05:41:27 +02:00

Plugins: Add method dumpFooter()

This commit is contained in:
Jakub Vrana
2025-03-11 08:59:38 +01:00
parent b02c3e1f7f
commit 199edfe11f
10 changed files with 39 additions and 21 deletions

View File

@@ -140,9 +140,7 @@ SET foreign_key_checks = 0;
}
}
if ($is_sql) {
echo "-- " . gmdate("Y-m-d H:i:s e") . "\n";
}
$adminer->dumpFooter();
exit;
}

View File

@@ -945,6 +945,15 @@ class Adminer {
return $ext;
}
/** Print text after export
* @return null prints data
*/
function dumpFooter() {
if ($_POST["format"] == "sql") {
echo "-- " . gmdate("Y-m-d H:i:s e") . "\n";
}
}
/** Set the path of the file for webserver load
* @return string path of the sql dump file
*/

View File

@@ -100,6 +100,7 @@ if ($_POST && !$error) {
$query = implode(" UNION ALL ", $union);
}
$adminer->dumpData($TABLE, "table", $query);
$adminer->dumpFooter();
exit;
}

View File

@@ -5,6 +5,7 @@ if (!$error && $_POST["export"]) {
dump_headers("sql");
$adminer->dumpTable("", "");
$adminer->dumpData("", "table", $_POST["query"]);
$adminer->dumpFooter();
exit;
}