1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-10 08:34:20 +02:00

AdminerDumpAlter: Use dumpFooter

This commit is contained in:
Jakub Vrana
2025-03-11 18:20:11 +01:00
parent 156839142e
commit 7b1ea5fa2c

View File

@@ -14,7 +14,7 @@ class AdminerDumpAlter {
}
}
function _database() {
private function database() {
// drop old tables
$query = "SELECT TABLE_NAME, ENGINE, TABLE_COLLATION, TABLE_COMMENT FROM information_schema.TABLES WHERE TABLE_SCHEMA = DATABASE()";
echo "DELIMITER ;;
@@ -59,9 +59,8 @@ SELECT @adminer_alter;
if ($first) {
$first = false;
echo "SET @adminer_alter = '';\n\n";
register_shutdown_function(array($this, '_database'));
} else {
$this->_database();
$this->database();
}
return true;
}
@@ -159,4 +158,10 @@ DROP PROCEDURE adminer_alter;
return true;
}
}
function dumpFooter() {
if ($_POST["format"] == "sql_alter") {
$this->database();
}
}
}