1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-17 03:53:59 +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

@@ -19,10 +19,6 @@ class AdminerDumpJson {
}
}
function _database() {
echo "}\n";
}
function dumpData($table, $style, $query) {
if ($_POST["format"] == "json") {
if ($this->database) {
@@ -30,7 +26,6 @@ class AdminerDumpJson {
} else {
$this->database = true;
echo "{\n";
register_shutdown_function(array($this, '_database'));
}
$connection = Adminer\connection();
$result = $connection->query($query, 1);
@@ -57,4 +52,10 @@ class AdminerDumpJson {
return "json";
}
}
function dumpFooter() {
if ($_POST["format"] == "json" && $this->database) {
echo "}\n";
}
}
}