Removed the confirmation stage for "OPTIMIZE" statements.
This commit is contained in:
@@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Confirmation form if required or include of other scripts
|
* Prepares the work and runs some other scripts if required
|
||||||
*/
|
*/
|
||||||
if (!empty($submit_mult)
|
if (!empty($submit_mult)
|
||||||
&& (!empty($selected_db) || !empty($selected_tbl) || !empty($selected_fld))) {
|
&& (!empty($selected_db) || !empty($selected_tbl) || !empty($selected_fld))) {
|
||||||
@@ -28,7 +28,9 @@ if (!empty($submit_mult)
|
|||||||
$what = 'empty_tbl';
|
$what = 'empty_tbl';
|
||||||
break;
|
break;
|
||||||
case $strOptimizeTable:
|
case $strOptimizeTable:
|
||||||
$what = 'optimize_tbl';
|
unset($submit_mult);
|
||||||
|
$query_type = 'optimize_tbl';
|
||||||
|
$mult_btn = (get_magic_quotes_gpc() ? addslashes($strYes) : $strYes);
|
||||||
break;
|
break;
|
||||||
} // end switch
|
} // end switch
|
||||||
}
|
}
|
||||||
@@ -41,7 +43,13 @@ if (!empty($submit_mult)
|
|||||||
exit();
|
exit();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} // end if
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Displays the confirmation form if required
|
||||||
|
*/
|
||||||
|
if (!empty($submit_mult) && !empty($what)) {
|
||||||
// Builds the query
|
// Builds the query
|
||||||
$full_query = '';
|
$full_query = '';
|
||||||
$selected_cnt = count($selected);
|
$selected_cnt = count($selected);
|
||||||
@@ -59,11 +67,12 @@ if (!empty($submit_mult)
|
|||||||
. (($i == $selected_cnt - 1) ? ';<br />' : '');
|
. (($i == $selected_cnt - 1) ? ';<br />' : '');
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'optimize_tbl':
|
// loic1: removed confirmation stage for "OPTIMIZE" statements
|
||||||
$full_query .= (empty($full_query) ? 'OPTIMIZE TABLE ' : ', ')
|
// case 'optimize_tbl':
|
||||||
. PMA_backquote(htmlspecialchars(urldecode($selected[$i])))
|
// $full_query .= (empty($full_query) ? 'OPTIMIZE TABLE ' : ', ')
|
||||||
. (($i == $selected_cnt - 1) ? ';<br />' : '');
|
// . PMA_backquote(htmlspecialchars(urldecode($selected[$i])))
|
||||||
break;
|
// . (($i == $selected_cnt - 1) ? ';<br />' : '');
|
||||||
|
// break;
|
||||||
|
|
||||||
case 'empty_tbl':
|
case 'empty_tbl':
|
||||||
$full_query .= 'DELETE FROM '
|
$full_query .= 'DELETE FROM '
|
||||||
@@ -118,7 +127,8 @@ if (!empty($submit_mult)
|
|||||||
|
|
||||||
include('./footer.inc.php3');
|
include('./footer.inc.php3');
|
||||||
exit();
|
exit();
|
||||||
}
|
} // end if
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Executes the query
|
* Executes the query
|
||||||
|
Reference in New Issue
Block a user