diff --git a/tbl_change.php b/tbl_change.php index 93b27a2fb..07e2a53dd 100644 --- a/tbl_change.php +++ b/tbl_change.php @@ -1,6 +1,9 @@ $db, + 'sql_query' => $sql_query +); + +if ( preg_match('@^tbl_@', $GLOBALS['goto'])) { + $_url_params['table'] = $table; } - -/** - * Ensures db and table are valid, else moves to the "parent" script - */ -require_once './libraries/db_table_exists.lib.php'; +$err_url = $GLOBALS['goto'] . PMA_generate_common_url($_url_params); +unset($_url_params); /** * Sets parameters for links + * where is this varaibel used? + * replace by PMA_generate_common_url($url_params); */ -$url_query = PMA_generate_common_url($db, $table) - . '&goto=tbl_sql.php'; +$url_query = PMA_generate_common_url($url_params, 'html', ''); +/** + * get table information + * @todo should be done by a Table object + */ require_once './libraries/tbl_info.inc.php'; -/* Get comments */ - +/** + * Get comments for table fileds/columns + */ $comments_map = array(); if ($GLOBALS['cfg']['ShowPropertyComments']) { @@ -100,6 +106,32 @@ if ($GLOBALS['cfg']['ShowPropertyComments']) { } } +/** + * START REGULAR OUTPUT + */ + +/** + * used in ./libraries/header.inc.php to load JavaScript library file + */ +$js_to_run = 'tbl_change.js'; + +/** + * HTTP and HTML headers + */ +require_once './libraries/header.inc.php'; + +/** + * Displays the query submitted and its result + * + * @todo where does $disp_message and $disp_query come from??? + */ +if (! empty($disp_message)) { + if (! isset($disp_query)) { + $disp_query = null; + } + PMA_showMessage($disp_message, $disp_query); +} + /** * Displays top menu links */ @@ -187,7 +219,7 @@ document.onkeydown = onKeyDownArrowsHandler;
> - + - +