diff --git a/db_export.php b/db_export.php index 1b86a328c1..f051a21b2d 100644 --- a/db_export.php +++ b/db_export.php @@ -48,8 +48,9 @@ $multi_values .= ''; $multi_values .= ''; $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 diff --git a/db_structure.php b/db_structure.php index b074d2ca04..dc48e51965 100644 --- a/db_structure.php +++ b/db_structure.php @@ -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])) { diff --git a/libraries/mult_submits.inc.php b/libraries/mult_submits.inc.php index f3702fd141..493436ceec 100644 --- a/libraries/mult_submits.inc.php +++ b/libraries/mult_submits.inc.php @@ -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': diff --git a/tbl_printview.php b/tbl_printview.php index ceba50268a..4a331c0a6b 100644 --- a/tbl_printview.php +++ b/tbl_printview.php @@ -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; }