Directly use POST parameters

This commit is contained in:
Marc Delisle 2013-08-01 08:41:59 -04:00
parent 5a34172c89
commit bfcaffe03b
4 changed files with 12 additions and 10 deletions

View File

@ -48,8 +48,9 @@ $multi_values .= '</a><br />';
$multi_values .= '<select name="table_select[]" id="table_select" size="10" multiple="multiple">';
$multi_values .= "\n";
if (!empty($selected_tbl) && empty($table_select)) {
$table_select = $selected_tbl;
// when called by libraries/mult_submits.inc.php
if (!empty($_POST['selected_tbl']) && empty($table_select)) {
$table_select = $_POST['selected_tbl'];
}
// Check if the selected tables are defined in $_GET

View File

@ -25,9 +25,7 @@ $scripts->addFile('jquery/jquery-ui-timepicker-addon.js');
$post_params = array(
'error',
'message',
'mult_btn',
'selected_tbl',
'submit_mult'
'mult_btn'
);
foreach ($post_params as $one_post_param) {
if (isset($_POST[$one_post_param])) {

View File

@ -43,7 +43,10 @@ foreach ($request_params as $one_request_param) {
*/
if (! empty($submit_mult)
&& $submit_mult != __('With selected:')
&& (! empty($selected_db) || ! empty($selected_tbl) || ! empty($selected_fld) || ! empty($rows_to_delete))
&& (! empty($selected_db)
|| ! empty($_POST['selected_tbl'])
|| ! empty($selected_fld)
|| ! empty($rows_to_delete))
) {
define('PMA_SUBMIT_MULT', 1);
if (isset($selected_db) && !empty($selected_db)) {
@ -51,13 +54,13 @@ if (! empty($submit_mult)
// selected databases
$selected = $selected_db;
$what = 'drop_db';
} elseif (isset($selected_tbl) && !empty($selected_tbl)) {
} elseif (! empty($_POST['selected_tbl'])) {
// coming from database structure view - do something with
// selected tables
if ($submit_mult == 'print') {
include './tbl_printview.php';
} else {
$selected = $selected_tbl;
$selected = $_POST['selected_tbl'];
switch ($submit_mult) {
case 'add_prefix_tbl':
case 'replace_prefix_tbl':

View File

@ -49,8 +49,8 @@ $GLOBALS['dbi']->selectDb($db);
/**
* Multi-tables printview
*/
if (isset($selected_tbl) && is_array($selected_tbl)) {
$the_tables = $selected_tbl;
if (isset($_POST['selected_tbl']) && is_array($_POST['selected_tbl'])) {
$the_tables = $_POST['selected_tbl'];
} elseif (strlen($table)) {
$the_tables[] = $table;
}