Cleanup phpMyAdmin tables also after multi submit actions (RFE #749989).

This commit is contained in:
Michal Čihař
2003-06-06 10:02:58 +00:00
parent ab5dd3adb4
commit 69cefd5bf9
4 changed files with 159 additions and 121 deletions

View File

@@ -158,17 +158,23 @@ if (!empty($submit_mult) && !empty($what)) {
*/
else if ($mult_btn == $strYes) {
if ($query_type == 'drop_db' || $query_type == 'drop_tbl' || $query_type == 'drop_fld') {
include('./libraries/relation_cleanup.lib.php3');
}
$sql_query = '';
$selected_cnt = count($selected);
for ($i = 0; $i < $selected_cnt; $i++) {
switch ($query_type) {
case 'drop_db':
PMA_relationsCleanupDatabase($selected[$i]);
$a_query = 'DROP DATABASE '
. PMA_backquote(urldecode($selected[$i]));
$reload = 1;
break;
case 'drop_tbl':
PMA_relationsCleanupTable($db, $selected[$i]);
$sql_query .= (empty($sql_query) ? 'DROP TABLE ' : ', ')
. PMA_backquote(urldecode($selected[$i]))
. (($i == $selected_cnt-1) ? ';' : '');
@@ -205,6 +211,7 @@ else if ($mult_btn == $strYes) {
break;
case 'drop_fld':
PMA_relationsCleanupTable($db, $table, $selected[$i]);
$sql_query .= (empty($sql_query) ? 'ALTER TABLE ' . PMA_backquote($table) : ',')
. ' DROP ' . PMA_backquote(urldecode($selected[$i]))
. (($i == $selected_cnt-1) ? ';' : '');