mirror of
https://github.com/vrana/adminer.git
synced 2025-08-12 17:44:07 +02:00
Plugins: Add method dumpFooter()
This commit is contained in:
@@ -19,16 +19,11 @@ class AdminerDumpXml {
|
||||
}
|
||||
}
|
||||
|
||||
function _database() {
|
||||
echo "</database>\n";
|
||||
}
|
||||
|
||||
function dumpData($table, $style, $query) {
|
||||
if ($_POST["format"] == "xml") {
|
||||
if (!$this->database) {
|
||||
$this->database = true;
|
||||
echo "<database name='" . Adminer\h(Adminer\DB) . "'>\n";
|
||||
register_shutdown_function(array($this, '_database'));
|
||||
}
|
||||
$connection = Adminer\connection();
|
||||
$result = $connection->query($query, 1);
|
||||
@@ -51,4 +46,10 @@ class AdminerDumpXml {
|
||||
return "xml";
|
||||
}
|
||||
}
|
||||
|
||||
function dumpFooter() {
|
||||
if ($_POST["format"] == "xml" && $this->database) {
|
||||
echo "</database>\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user