1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-12 17:44:07 +02:00

Don't drop original view and routine before creating the new one

This commit is contained in:
Jakub Vrana
2013-05-08 07:55:08 -07:00
parent b7021c9c7f
commit e99463b295
5 changed files with 63 additions and 45 deletions

View File

@@ -340,7 +340,8 @@ function grant($grant, $privileges, $columns, $on) {
/** Drop old object and create a new one
* @param string drop query
* @param string create query
* @param string rollback query
* @param string test query
* @param string drop test query
* @param string
* @param string
* @param string
@@ -348,17 +349,15 @@ function grant($grant, $privileges, $columns, $on) {
* @param string
* @return null redirect in success
*/
function drop_create($drop, $create, $rollback, $location, $message_drop, $message_alter, $message_create, $name) {
function drop_create($drop, $create, $test, $drop_test, $location, $message_drop, $message_alter, $message_create, $name) {
if ($_POST["drop"]) {
query_redirect($drop, $location, $message_drop);
} else {
if ($name != "") {
queries($drop);
}
queries_redirect($location, ($name != "" ? $message_alter : $message_create), queries($create));
if ($name != "") {
queries($rollback);
}
queries_redirect(
$location,
($name != "" ? $message_alter : $message_create),
($name == "" || (queries($test) && queries($drop_test) && queries($drop))) && queries($create)
);
}
}