From 5a34172c898c4003bfe59c06289a4bc5ab278944 Mon Sep 17 00:00:00 2001 From: Marc Delisle Date: Thu, 1 Aug 2013 07:33:25 -0400 Subject: [PATCH] The condition on $is_info no longer exists. --- db_operations.php | 24 +++++++------------ db_structure.php | 60 +++++++++++++++++++++-------------------------- 2 files changed, 36 insertions(+), 48 deletions(-) diff --git a/db_operations.php b/db_operations.php index 6561764ca3..938f63ace9 100644 --- a/db_operations.php +++ b/db_operations.php @@ -186,23 +186,17 @@ if (isset($_REQUEST['comment'])) { PMA_setDbComment($db, $_REQUEST['comment']); } -/** - * Prepares the tables list if the user where not redirected to this script - * because there is no table in the database ($is_info is true) - */ -if (empty($is_info)) { - include 'libraries/db_common.inc.php'; - $url_query .= '&goto=db_operations.php'; +include 'libraries/db_common.inc.php'; +$url_query .= '&goto=db_operations.php'; - // Gets the database structure - $sub_part = '_structure'; - include 'libraries/db_info.inc.php'; - echo "\n"; +// Gets the database structure +$sub_part = '_structure'; +include 'libraries/db_info.inc.php'; +echo "\n"; - if (isset($message)) { - echo PMA_Util::getMessage($message, $sql_query); - unset($message); - } +if (isset($message)) { + echo PMA_Util::getMessage($message, $sql_query); + unset($message); } $_REQUEST['db_collation'] = PMA_getDbCollation($db); diff --git a/db_structure.php b/db_structure.php index e232da44e4..b074d2ca04 100644 --- a/db_structure.php +++ b/db_structure.php @@ -24,7 +24,6 @@ $scripts->addFile('jquery/jquery-ui-timepicker-addon.js'); $post_params = array( 'error', - 'is_info', 'message', 'mult_btn', 'selected_tbl', @@ -35,42 +34,37 @@ foreach ($post_params as $one_post_param) { $GLOBALS[$one_post_param] = $_POST[$one_post_param]; } } -/** - * Prepares the tables list if the user where not redirected to this script - * because there is no table in the database ($is_info is true) - */ -if (empty($_POST['is_info'])) { - // Drops/deletes/etc. multiple tables if required - if ((!empty($_POST['submit_mult']) && isset($_POST['selected_tbl'])) - || isset($_POST['mult_btn']) - ) { - $action = 'db_structure.php'; - $err_url = 'db_structure.php?'. PMA_generate_common_url($db); - // see bug #2794840; in this case, code path is: - // db_structure.php -> libraries/mult_submits.inc.php -> sql.php - // -> db_structure.php and if we got an error on the multi submit, - // we must display it here and not call again mult_submits.inc.php - if (! isset($_POST['error']) || false === $_POST['error']) { - include 'libraries/mult_submits.inc.php'; - } - if (empty($_POST['message'])) { - $_POST['message'] = PMA_Message::success(); - } +// Drops/deletes/etc. multiple tables if required +if ((!empty($_POST['submit_mult']) && isset($_POST['selected_tbl'])) + || isset($_POST['mult_btn']) +) { + $action = 'db_structure.php'; + $err_url = 'db_structure.php?'. PMA_generate_common_url($db); + + // see bug #2794840; in this case, code path is: + // db_structure.php -> libraries/mult_submits.inc.php -> sql.php + // -> db_structure.php and if we got an error on the multi submit, + // we must display it here and not call again mult_submits.inc.php + if (! isset($_POST['error']) || false === $_POST['error']) { + include 'libraries/mult_submits.inc.php'; } - include 'libraries/db_common.inc.php'; - $url_query .= '&goto=db_structure.php'; - - // Gets the database structure - $sub_part = '_structure'; - include 'libraries/db_info.inc.php'; - - if (!PMA_DRIZZLE) { - include_once 'libraries/replication.inc.php'; - } else { - $server_slave_status = false; + if (empty($_POST['message'])) { + $_POST['message'] = PMA_Message::success(); } } +include 'libraries/db_common.inc.php'; +$url_query .= '&goto=db_structure.php'; + +// Gets the database structure +$sub_part = '_structure'; +include 'libraries/db_info.inc.php'; + +if (!PMA_DRIZZLE) { + include_once 'libraries/replication.inc.php'; +} else { + $server_slave_status = false; +} require_once 'libraries/bookmark.lib.php';