diff --git a/htdocs/sql/tbl_move_copy.php b/htdocs/sql/tbl_move_copy.php new file mode 100755 --- /dev/null +++ b/htdocs/sql/tbl_move_copy.php @@ -0,0 +1,82 @@ + do the work + */ +if (isset($new_name) && trim($new_name) != '') { + if ($db == $target_db && $table == $new_name) { + $message = (isset($submit_move) ? $strMoveTableSameNames : $strCopyTableSameNames); + } else { + PMA_Table::moveCopy($db, $table, $target_db, $new_name, $what, isset($submit_move), 'one_table'); + $js_to_run = 'functions.js'; + $message = (isset($submit_move) ? $strMoveTableOK : $strCopyTableOK); + $message = sprintf($message, htmlspecialchars($table), htmlspecialchars($new_name)); + $reload = 1; + /* Check: Work on new table or on old table? */ + if (isset($submit_move)) { + $db = $target_db; + $table = $new_name; + } else { + $pma_uri_parts = parse_url($cfg['PmaAbsoluteUri']); + if (isset($switch_to_new) && $switch_to_new == 'true') { + PMA_setCookie('pma_switch_to_new', 'true'); + $db = $target_db; + $table = $new_name; + } else { + PMA_removeCookie('pma_switch_to_new'); + } + } + } + require_once './libraries/header.inc.php'; +} // end is target table name + + +/** + * No new name for the table! + */ +else { + require_once './libraries/header.inc.php'; + PMA_mysqlDie($strTableEmpty, '', '', $err_url); +} + + +/** + * Back to the calling script + */ + +require './tbl_sql.php'; +?>