diff --git a/sql.php b/sql.php index abc1ccf59..eb6dc5269 100644 --- a/sql.php +++ b/sql.php @@ -932,5 +932,7 @@ window.onload = function() /** * Displays the footer */ -require './libraries/footer.inc.php'; +if(!isset($_REQUEST['table_maintenance'])) { + require './libraries/footer.inc.php'; +} ?> diff --git a/tbl_move_copy.php b/tbl_move_copy.php index 9f0e229b4..330edcc0b 100644 --- a/tbl_move_copy.php +++ b/tbl_move_copy.php @@ -45,9 +45,9 @@ if (PMA_isValid($_REQUEST['new_name'])) { } else { $message = PMA_Message::error(__('Can\'t copy table to same one!')); } - $goto = './tbl_operations.php'; + $result = false; } else { - PMA_Table::moveCopy($db, $table, $_REQUEST['target_db'], $_REQUEST['new_name'], + $result = PMA_Table::moveCopy($db, $table, $_REQUEST['target_db'], $_REQUEST['new_name'], $_REQUEST['what'], isset($_REQUEST['submit_move']), 'one_table'); if (isset($_REQUEST['submit_move'])) { @@ -66,23 +66,18 @@ if (PMA_isValid($_REQUEST['new_name'])) { $table = $_REQUEST['new_name']; } $reload = 1; - - $disp_query = $sql_query; - $disp_message = $message; - unset($sql_query, $message); - - $goto = $cfg['DefaultTabTable']; } } else { /** * No new name for the table! */ $message = PMA_Message::error(__('The table name is empty!')); - $goto = './tbl_operations.php'; + $result = false; } /** * Back to the calling script */ -require $goto; +$_message = $message; +unset($message); ?> diff --git a/tbl_operations.php b/tbl_operations.php index 8b25c8c42..3c8b5dd45 100644 --- a/tbl_operations.php +++ b/tbl_operations.php @@ -63,6 +63,20 @@ if ($is_aria) { $reread_info = false; $table_alters = array(); +/** + * If the table has to be moved to some other database + */ +if(isset($_REQUEST['submit_move']) || isset($_REQUEST['submit_copy'])) { + $_message = ''; + require_once './tbl_move_copy.php'; +} +/** + * If the table has to be maintained + */ +if(isset($_REQUEST['table_maintenance'])) { + require_once './sql.php'; + unset($result); +} /** * Updates table comment, type and options if required */ @@ -266,7 +280,7 @@ unset($columns);