mirror of
https://github.com/vrana/adminer.git
synced 2025-08-13 01:54:00 +02:00
AdminerDumpAlter: Use dumpFooter
This commit is contained in:
@@ -14,7 +14,7 @@ class AdminerDumpAlter {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function _database() {
|
private function database() {
|
||||||
// drop old tables
|
// drop old tables
|
||||||
$query = "SELECT TABLE_NAME, ENGINE, TABLE_COLLATION, TABLE_COMMENT FROM information_schema.TABLES WHERE TABLE_SCHEMA = DATABASE()";
|
$query = "SELECT TABLE_NAME, ENGINE, TABLE_COLLATION, TABLE_COMMENT FROM information_schema.TABLES WHERE TABLE_SCHEMA = DATABASE()";
|
||||||
echo "DELIMITER ;;
|
echo "DELIMITER ;;
|
||||||
@@ -59,9 +59,8 @@ SELECT @adminer_alter;
|
|||||||
if ($first) {
|
if ($first) {
|
||||||
$first = false;
|
$first = false;
|
||||||
echo "SET @adminer_alter = '';\n\n";
|
echo "SET @adminer_alter = '';\n\n";
|
||||||
register_shutdown_function(array($this, '_database'));
|
|
||||||
} else {
|
} else {
|
||||||
$this->_database();
|
$this->database();
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -159,4 +158,10 @@ DROP PROCEDURE adminer_alter;
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function dumpFooter() {
|
||||||
|
if ($_POST["format"] == "sql_alter") {
|
||||||
|
$this->database();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user