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