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:
@@ -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";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user