Rename db_* files to drop useless _details part.

This commit is contained in:
Michal Čihař
2006-10-25 12:25:01 +00:00
parent ad06b4a991
commit cac4247057
34 changed files with 93 additions and 91 deletions

View File

@@ -9,7 +9,9 @@ $HeadURL$
* Documentation.html, libraries/tbl_properties.inc.php, * Documentation.html, libraries/tbl_properties.inc.php,
libraries/config.default.php: Allow to edit small number of fields libraries/config.default.php: Allow to edit small number of fields
vertically and lange number horizontally (RFE #1581773). vertically and lange number horizontally (RFE #1581773).
* [too much files]: Rename tbl_* files to drop useless _properties part. * [too much files]:
- Rename tbl_* files to drop useless _properties part.
- Rename db_* files to drop useless _details part.
2006-10-19 Marc Delisle <lem9@users.sourceforge.net> 2006-10-19 Marc Delisle <lem9@users.sourceforge.net>
* libraries/common.lib.php, /database_interface.lib.php,/session.inc.php: * libraries/common.lib.php, /database_interface.lib.php,/session.inc.php:

View File

@@ -1335,8 +1335,8 @@ ALTER TABLE `pma_column_comments`
<dt id="cfg_DefaultTabDatabase">$cfg['DefaultTabDatabase'] string</dt> <dt id="cfg_DefaultTabDatabase">$cfg['DefaultTabDatabase'] string</dt>
<dd>Defines the tab displayed by default on database view. Possible <dd>Defines the tab displayed by default on database view. Possible
values: &quot;db_details_structure.php&quot;, values: &quot;db_structure.php&quot;,
&quot;db_details.php&quot; or &quot;db_search.php&quot;.</dd> &quot;db_sql.php&quot; or &quot;db_search.php&quot;.</dd>
<dt id="cfg_DefaultTabTable">$cfg['DefaultTabTable'] string</dt> <dt id="cfg_DefaultTabTable">$cfg['DefaultTabTable'] string</dt>
<dd>Defines the tab displayed by default on table view. Possible <dd>Defines the tab displayed by default on table view. Possible
@@ -2550,7 +2550,7 @@ ALTER TABLE `pma_column_comments`
<h4 id="faq1_27"> <h4 id="faq1_27">
<a href="#faq1_27">1.27 I get empty page when I want to view huge page (eg. <a href="#faq1_27">1.27 I get empty page when I want to view huge page (eg.
db_details_structure.php with plenty of tables).</a></h4> db_structure.php with plenty of tables).</a></h4>
<p> This is a <a href="http://bugs.php.net/21079">PHP bug</a> that occur when <p> This is a <a href="http://bugs.php.net/21079">PHP bug</a> that occur when
GZIP output buffering is enabled. If you turn off it (by GZIP output buffering is enabled. If you turn off it (by

View File

@@ -7,7 +7,7 @@
* Gets some core libraries * Gets some core libraries
*/ */
require_once('./libraries/common.lib.php'); require_once('./libraries/common.lib.php');
require_once('./libraries/db_details_common.inc.php'); require_once('./libraries/db_common.inc.php');
require_once('./libraries/relation.lib.php'); require_once('./libraries/relation.lib.php');

View File

@@ -31,7 +31,7 @@ PMA_checkParameters(array('db'));
if (isset($table)) { if (isset($table)) {
$err_url = 'tbl_sql.php?' . PMA_generate_common_url($db, $table); $err_url = 'tbl_sql.php?' . PMA_generate_common_url($db, $table);
} else { } else {
$err_url = 'db_details.php?' . PMA_generate_common_url($db); $err_url = 'db_sql.php?' . PMA_generate_common_url($db);
} }
if ($cfgRelation['commwork']) { if ($cfgRelation['commwork']) {

View File

@@ -4,7 +4,7 @@
/** /**
* dumps a database * dumps a database
* *
* @uses libraries/db_details_common.inc.php * @uses libraries/db_common.inc.php
* @uses libraries/db_info.inc.php * @uses libraries/db_info.inc.php
* @uses libraries/display_export.lib.php * @uses libraries/display_export.lib.php
* @uses $tables from libraries/db_info.inc.php * @uses $tables from libraries/db_info.inc.php
@@ -16,8 +16,8 @@
require_once('./libraries/common.lib.php'); require_once('./libraries/common.lib.php');
$sub_part = '_export'; $sub_part = '_export';
require_once('./libraries/db_details_common.inc.php'); require_once('./libraries/db_common.inc.php');
$url_query .= '&amp;goto=db_details_export.php'; $url_query .= '&amp;goto=db_export.php';
require_once('./libraries/db_info.inc.php'); require_once('./libraries/db_info.inc.php');
/** /**
@@ -55,9 +55,9 @@ foreach ( $tables as $each_table ) {
$multi_values .= "\n"; $multi_values .= "\n";
$multi_values .= '</select></div>'; $multi_values .= '</select></div>';
$checkall_url = 'db_details_export.php?' $checkall_url = 'db_export.php?'
. PMA_generate_common_url( $db ) . PMA_generate_common_url( $db )
. '&amp;goto=db_details_export.php'; . '&amp;goto=db_export.php';
$multi_values .= '<br /> $multi_values .= '<br />
<a href="' . $checkall_url . '" onclick="setSelectOptions(\'dump\', \'table_select[]\', true); return false;">' . $strSelectAll . '</a> <a href="' . $checkall_url . '" onclick="setSelectOptions(\'dump\', \'table_select[]\', true); return false;">' . $strSelectAll . '</a>

View File

@@ -7,7 +7,7 @@ require_once('./libraries/common.lib.php');
/** /**
* Gets tables informations and displays top links * Gets tables informations and displays top links
*/ */
require('./libraries/db_details_common.inc.php'); require('./libraries/db_common.inc.php');
require('./libraries/db_info.inc.php'); require('./libraries/db_info.inc.php');
$import_type = 'database'; $import_type = 'database';

View File

@@ -207,7 +207,7 @@ if (isset($cfg['docSQLDir']) && !empty($cfg['docSQLDir'])) {
*/ */
?> ?>
<form method="post" action="db_details_importdocsql.php" <?php if ($is_upload) { echo ' enctype="multipart/form-data"'; } ?>> <form method="post" action="db_importdocsql.php" <?php if ($is_upload) { echo ' enctype="multipart/form-data"'; } ?>>
<?php echo PMA_generate_common_hidden_inputs($db); ?> <?php echo PMA_generate_common_hidden_inputs($db); ?>
<input type="hidden" name="submit_show" value="true" /> <input type="hidden" name="submit_show" value="true" />
<input type="hidden" name="do" value="import" /> <input type="hidden" name="do" value="import" />

View File

@@ -180,7 +180,7 @@ if ($cfgRelation['commwork'] && isset($db_comment) && $db_comment == 'true') {
* because there is no table in the database ($is_info is true) * because there is no table in the database ($is_info is true)
*/ */
if (empty($is_info)) { if (empty($is_info)) {
require './libraries/db_details_common.inc.php'; require './libraries/db_common.inc.php';
$url_query .= '&amp;goto=db_operations.php'; $url_query .= '&amp;goto=db_operations.php';
// Gets the database structure // Gets the database structure
@@ -475,7 +475,7 @@ if ($num_tables > 0
* import docSQL files * import docSQL files
*/ */
echo '<ul>' . "\n" echo '<ul>' . "\n"
.'<li><a href="db_details_importdocsql.php?' . $takeaway . '">' . "\n"; .'<li><a href="db_importdocsql.php?' . $takeaway . '">' . "\n";
if ($cfg['PropertiesIconic']) { if ($cfg['PropertiesIconic']) {
echo '<img class="icon" src="' . $pmaThemeImage . 'b_docsql.png"' echo '<img class="icon" src="' . $pmaThemeImage . 'b_docsql.png"'
.' alt="" width="16" height="16" />'; .' alt="" width="16" height="16" />';

View File

@@ -15,7 +15,7 @@ PMA_checkParameters(array('db'));
/** /**
* Defines the url to return to in case of error in a sql statement * Defines the url to return to in case of error in a sql statement
*/ */
$err_url = 'db_details.php?' . PMA_generate_common_url($db); $err_url = 'db_sql.php?' . PMA_generate_common_url($db);
/** /**
* Settings for relations stuff * Settings for relations stuff

View File

@@ -25,16 +25,16 @@ $cfgRelation = PMA_getRelationsParam();
*/ */
if (isset($_REQUEST['submit_sql']) if (isset($_REQUEST['submit_sql'])
&& preg_match('@^SELECT@i', $_REQUEST['encoded_sql_query'])) { && preg_match('@^SELECT@i', $_REQUEST['encoded_sql_query'])) {
$goto = 'db_details.php'; $goto = 'db_sql.php';
$zero_rows = htmlspecialchars($GLOBALS['strSuccess']); $zero_rows = htmlspecialchars($GLOBALS['strSuccess']);
$sql_query = urldecode($_REQUEST['encoded_sql_query']); $sql_query = urldecode($_REQUEST['encoded_sql_query']);
require './sql.php'; require './sql.php';
exit; exit;
} else { } else {
$sub_part = '_qbe'; $sub_part = '_qbe';
require './libraries/db_details_common.inc.php'; require './libraries/db_common.inc.php';
$url_query .= '&amp;goto=db_details_qbe.php'; $url_query .= '&amp;goto=db_qbe.php';
$url_params['goto'] = 'db_details_qbe.php'; $url_params['goto'] = 'db_qbe.php';
require './libraries/db_info.inc.php'; require './libraries/db_info.inc.php';
} }
@@ -170,7 +170,7 @@ function showColumnSelectCell($columns, $column_number, $selected = '')
?> ?>
<form action="db_details_qbe.php" method="post"> <form action="db_qbe.php" method="post">
<table class="data" style="width: 100%;"> <table class="data" style="width: 100%;">
<tr class="odd noclick"> <tr class="odd noclick">
<th><?php echo $strField; ?>:</th> <th><?php echo $strField; ?>:</th>

View File

@@ -10,7 +10,7 @@ require_once('./libraries/common.lib.php');
/** /**
* Gets some core libraries and send headers * Gets some core libraries and send headers
*/ */
require('./libraries/db_details_common.inc.php'); require('./libraries/db_common.inc.php');
// If config variable $cfg['Usedbsearch'] is on FALSE : exit. // If config variable $cfg['Usedbsearch'] is on FALSE : exit.
if (!$cfg['UseDbSearch']) { if (!$cfg['UseDbSearch']) {
PMA_mysqlDie($strAccessDenied, '', FALSE, $err_url); PMA_mysqlDie($strAccessDenied, '', FALSE, $err_url);
@@ -28,7 +28,7 @@ $num_tables = count( $tables );
* Displays top links * Displays top links
*/ */
$sub_part = ''; $sub_part = '';
require('./libraries/db_details_links.inc.php'); require('./libraries/db_links.inc.php');
/** /**
@@ -155,7 +155,7 @@ if (isset($_REQUEST['submit_search'])) {
$this_url_params = array( $this_url_params = array(
'db' => $GLOBALS['db'], 'db' => $GLOBALS['db'],
'goto' => 'db_details.php', 'goto' => 'db_sql.php',
'pos' => 0, 'pos' => 0,
'is_js_confirmed' => 0, 'is_js_confirmed' => 0,
); );

View File

@@ -7,18 +7,18 @@ require_once('./libraries/common.lib.php');
/** /**
* Runs common work * Runs common work
*/ */
require('./libraries/db_details_common.inc.php'); require('./libraries/db_common.inc.php');
require_once './libraries/sql_query_form.lib.php'; require_once './libraries/sql_query_form.lib.php';
/** /**
* Gets informations about the database and, if it is empty, move to the * Gets informations about the database and, if it is empty, move to the
* "db_details_structure.php" script where table can be created * "db_structure.php" script where table can be created
*/ */
require('./libraries/db_info.inc.php'); require('./libraries/db_info.inc.php');
if ( $num_tables == 0 && empty( $db_query_force ) ) { if ( $num_tables == 0 && empty( $db_query_force ) ) {
$sub_part = ''; $sub_part = '';
$is_info = TRUE; $is_info = TRUE;
require './db_details_structure.php'; require './db_structure.php';
exit(); exit();
} }

View File

@@ -13,13 +13,13 @@ if (empty($is_info)) {
// Drops/deletes/etc. multiple tables if required // Drops/deletes/etc. multiple tables if required
if ((!empty($submit_mult) && isset($selected_tbl)) if ((!empty($submit_mult) && isset($selected_tbl))
|| isset($mult_btn)) { || isset($mult_btn)) {
$action = 'db_details_structure.php'; $action = 'db_structure.php';
$err_url = 'db_details_structure.php?'. PMA_generate_common_url($db); $err_url = 'db_structure.php?'. PMA_generate_common_url($db);
require './libraries/mult_submits.inc.php'; require './libraries/mult_submits.inc.php';
$message = $strSuccess; $message = $strSuccess;
} }
require './libraries/db_details_common.inc.php'; require './libraries/db_common.inc.php';
$url_query .= '&amp;goto=db_details_structure.php'; $url_query .= '&amp;goto=db_structure.php';
// Gets the database structure // Gets the database structure
$sub_part = '_structure'; $sub_part = '_structure';
@@ -155,7 +155,7 @@ if (true == $cfg['PropertiesIconic']) {
* Displays the tables list * Displays the tables list
*/ */
?> ?>
<form method="post" action="db_details_structure.php" name="tablesForm" id="tablesForm"> <form method="post" action="db_structure.php" name="tablesForm" id="tablesForm">
<?php <?php
echo PMA_generate_common_hidden_inputs($db); echo PMA_generate_common_hidden_inputs($db);
@@ -435,7 +435,7 @@ if ($is_show_stats) {
<div class="clearfloat"> <div class="clearfloat">
<?php <?php
// Check all tables url // Check all tables url
$checkall_url = 'db_details_structure.php?' . PMA_generate_common_url($db); $checkall_url = 'db_structure.php?' . PMA_generate_common_url($db);
?> ?>
<img class="selectallarrow" src="<?php echo $pmaThemeImage .'arrow_'.$text_dir.'.png'; ?>" <img class="selectallarrow" src="<?php echo $pmaThemeImage .'arrow_'.$text_dir.'.png'; ?>"
width="38" height="22" alt="<?php echo $strWithChecked; ?>" /> width="38" height="22" alt="<?php echo $strWithChecked; ?>" />

View File

@@ -32,8 +32,8 @@ if (isset($export_list[$type]['force_file']) && ! isset($asfile)) {
$active_page = 'server_export.php'; $active_page = 'server_export.php';
require('./server_export.php'); require('./server_export.php');
} elseif ($export_type == 'database') { } elseif ($export_type == 'database') {
$active_page = 'db_details_export.php'; $active_page = 'db_export.php';
require('./db_details_export.php'); require('./db_export.php');
} else { } else {
$active_page = 'tbl_export.php'; $active_page = 'tbl_export.php';
require('./tbl_export.php'); require('./tbl_export.php');
@@ -45,7 +45,7 @@ if (isset($export_list[$type]['force_file']) && ! isset($asfile)) {
if ($export_type == 'server') { if ($export_type == 'server') {
$err_url = 'server_export.php?' . PMA_generate_common_url(); $err_url = 'server_export.php?' . PMA_generate_common_url();
} elseif ($export_type == 'database' && isset($db) && strlen($db)) { } elseif ($export_type == 'database' && isset($db) && strlen($db)) {
$err_url = 'db_details_export.php?' . PMA_generate_common_url($db); $err_url = 'db_export.php?' . PMA_generate_common_url($db);
} elseif ($export_type == 'table' && isset($db) && strlen($db) && isset($table) && strlen($table)) { } elseif ($export_type == 'table' && isset($db) && strlen($db) && isset($table) && strlen($table)) {
$err_url = 'tbl_export.php?' . PMA_generate_common_url($db, $table); $err_url = 'tbl_export.php?' . PMA_generate_common_url($db, $table);
} else { } else {
@@ -300,8 +300,8 @@ if ($save_on_server) {
$active_page = 'server_export.php'; $active_page = 'server_export.php';
require('./server_export.php'); require('./server_export.php');
} elseif ($export_type == 'database') { } elseif ($export_type == 'database') {
$active_page = 'db_details_export.php'; $active_page = 'db_export.php';
require('./db_details_export.php'); require('./db_export.php');
} else { } else {
$active_page = 'tbl_export.php'; $active_page = 'tbl_export.php';
require('./tbl_export.php'); require('./tbl_export.php');
@@ -349,8 +349,8 @@ if (!$save_on_server) {
$message = $strNoTablesFound; $message = $strNoTablesFound;
$js_to_run = 'functions.js'; $js_to_run = 'functions.js';
require_once('./libraries/header.inc.php'); require_once('./libraries/header.inc.php');
$active_page = 'db_details_export.php'; $active_page = 'db_export.php';
require('./db_details_export.php'); require('./db_export.php');
exit(); exit();
} }
} }
@@ -549,8 +549,8 @@ if ($save_on_server && isset($message)) {
$active_page = 'server_export.php'; $active_page = 'server_export.php';
require('./server_export.php'); require('./server_export.php');
} elseif ($export_type == 'database') { } elseif ($export_type == 'database') {
$active_page = 'db_details_export.php'; $active_page = 'db_export.php';
require('./db_details_export.php'); require('./db_export.php');
} else { } else {
$active_page = 'tbl_export.php'; $active_page = 'tbl_export.php';
require('./tbl_export.php'); require('./tbl_export.php');
@@ -611,8 +611,8 @@ if (!empty($asfile)) {
$active_page = 'server_export.php'; $active_page = 'server_export.php';
require_once('./server_export.php'); require_once('./server_export.php');
} elseif ($export_type == 'database') { } elseif ($export_type == 'database') {
$active_page = 'db_details_export.php'; $active_page = 'db_export.php';
require_once('./db_details_export.php'); require_once('./db_export.php');
} else { } else {
$active_page = 'tbl_export.php'; $active_page = 'tbl_export.php';
require_once('./tbl_export.php'); require_once('./tbl_export.php');

View File

@@ -77,7 +77,7 @@ if ($import_type == 'table') {
if (isset($table) && isset($db)) { if (isset($table) && isset($db)) {
$goto = 'tbl_structure.php'; $goto = 'tbl_structure.php';
} elseif (isset($db)) { } elseif (isset($db)) {
$goto = 'db_details_structure.php'; $goto = 'db_structure.php';
} else { } else {
$goto = 'server_sql.php'; $goto = 'server_sql.php';
} }

View File

@@ -746,7 +746,7 @@ if (!defined('PMA_MINIMUM_COMMON')) {
if (isset($table)) { if (isset($table)) {
$doedit_goto = '<a href="tbl_sql.php?' . PMA_generate_common_url($db, $table) . '&amp;sql_query=' . urlencode($the_query) . '&amp;show_query=1">'; $doedit_goto = '<a href="tbl_sql.php?' . PMA_generate_common_url($db, $table) . '&amp;sql_query=' . urlencode($the_query) . '&amp;show_query=1">';
} else { } else {
$doedit_goto = '<a href="db_details.php?' . PMA_generate_common_url($db) . '&amp;sql_query=' . urlencode($the_query) . '&amp;show_query=1">'; $doedit_goto = '<a href="db_sql.php?' . PMA_generate_common_url($db) . '&amp;sql_query=' . urlencode($the_query) . '&amp;show_query=1">';
} }
if ($GLOBALS['cfg']['PropertiesIconic']) { if ($GLOBALS['cfg']['PropertiesIconic']) {
echo $doedit_goto echo $doedit_goto
@@ -1371,7 +1371,7 @@ window.parent.updateTableTitle('<?php echo $uni_tbl; ?>', '<?php echo PMA_jsForm
//if (!isset($GLOBALS['goto'])) { //if (!isset($GLOBALS['goto'])) {
//$edit_target = (isset($GLOBALS['table'])) ? $cfg['DefaultTabTable'] : $cfg['DefaultTabDatabase']; //$edit_target = (isset($GLOBALS['table'])) ? $cfg['DefaultTabTable'] : $cfg['DefaultTabDatabase'];
$edit_target = isset($GLOBALS['db']) ? (isset($GLOBALS['table']) ? 'tbl_sql.php' : 'db_details.php') : 'server_sql.php'; $edit_target = isset($GLOBALS['db']) ? (isset($GLOBALS['table']) ? 'tbl_sql.php' : 'db_sql.php') : 'server_sql.php';
//} elseif ($GLOBALS['goto'] != 'main.php') { //} elseif ($GLOBALS['goto'] != 'main.php') {
// $edit_target = $GLOBALS['goto']; // $edit_target = $GLOBALS['goto'];
//} else { //} else {
@@ -2574,11 +2574,11 @@ $goto_whitelist = array(
//'chk_rel.php', //'chk_rel.php',
'db_create.php', 'db_create.php',
'db_datadict.php', 'db_datadict.php',
'db_details.php', 'db_sql.php',
'db_details_export.php', 'db_export.php',
'db_details_importdocsql.php', 'db_importdocsql.php',
'db_details_qbe.php', 'db_qbe.php',
'db_details_structure.php', 'db_structure.php',
'db_import.php', 'db_import.php',
'db_operations.php', 'db_operations.php',
'db_printview.php', 'db_printview.php',

View File

@@ -161,7 +161,7 @@ $cfg['LeftFrameTableLevel'] = '1'; // How many sublevels should be display
// up tables by the above Separator // up tables by the above Separator
$cfg['ShowTooltip'] = TRUE; // display table comment as tooltip in left frame $cfg['ShowTooltip'] = TRUE; // display table comment as tooltip in left frame
$cfg['ShowTooltipAliasDB'] = FALSE; // if ShowToolTip is enabled, this defines that table/db comments $cfg['ShowTooltipAliasDB'] = FALSE; // if ShowToolTip is enabled, this defines that table/db comments
$cfg['ShowTooltipAliasTB'] = FALSE; // are shown (in the left menu and db_details_structure) instead of $cfg['ShowTooltipAliasTB'] = FALSE; // are shown (in the left menu and db_structure) instead of
// table/db names. Setting ShowTooltipAliasTB to 'nested' will only // table/db names. Setting ShowTooltipAliasTB to 'nested' will only
// use the Aliases for nested descriptors, not the table itself. // use the Aliases for nested descriptors, not the table itself.
@@ -235,10 +235,10 @@ $cfg['DefaultTabServer'] = 'main.php';
// 'server_variables.php' = MySQL server variables // 'server_variables.php' = MySQL server variables
// 'server_privileges.php' = user management // 'server_privileges.php' = user management
// 'server_processlist.php' = process list // 'server_processlist.php' = process list
$cfg['DefaultTabDatabase'] = 'db_details_structure.php'; $cfg['DefaultTabDatabase'] = 'db_structure.php';
// Possible values: // Possible values:
// 'db_details_structure.php' = tables list // 'db_structure.php' = tables list
// 'db_details.php' = sql form // 'db_sql.php' = sql form
// 'db_search.php' = search query // 'db_search.php' = search query
// 'db_operations.php' = operations on database // 'db_operations.php' = operations on database
$cfg['DefaultTabTable'] = 'tbl_structure.php'; $cfg['DefaultTabTable'] = 'tbl_structure.php';

View File

@@ -136,5 +136,5 @@ $num_tables = count( $tables );
/** /**
* Displays top menu links * Displays top menu links
*/ */
require('./libraries/db_details_links.inc.php'); require('./libraries/db_links.inc.php');
?> ?>

View File

@@ -28,7 +28,7 @@ if (($is_superuser || $GLOBALS['cfg']['AllowUserDropDatabase']) && ! $db_is_info
$tab_drop['args']['sql_query'] = 'DROP DATABASE ' . PMA_backquote($db); $tab_drop['args']['sql_query'] = 'DROP DATABASE ' . PMA_backquote($db);
$tab_drop['args']['zero_rows'] = sprintf($GLOBALS['strDatabaseHasBeenDropped'], htmlspecialchars(PMA_backquote($db))); $tab_drop['args']['zero_rows'] = sprintf($GLOBALS['strDatabaseHasBeenDropped'], htmlspecialchars(PMA_backquote($db)));
$tab_drop['args']['goto'] = 'main.php'; $tab_drop['args']['goto'] = 'main.php';
$tab_drop['args']['back'] = 'db_details' . $sub_part . '.php'; $tab_drop['args']['back'] = 'db' . $sub_part . '.php';
$tab_drop['args']['reload'] = 1; $tab_drop['args']['reload'] = 1;
$tab_drop['args']['purge'] = 1; $tab_drop['args']['purge'] = 1;
$tab_drop['attr'] = 'onclick="return confirmLinkDropDB(this, \'DROP DATABASE ' . PMA_jsFormat($db) . '\')"'; $tab_drop['attr'] = 'onclick="return confirmLinkDropDB(this, \'DROP DATABASE ' . PMA_jsFormat($db) . '\')"';
@@ -38,16 +38,16 @@ if (($is_superuser || $GLOBALS['cfg']['AllowUserDropDatabase']) && ! $db_is_info
* export, search and qbe links if there is at least one table * export, search and qbe links if there is at least one table
*/ */
if ( $num_tables > 0 ) { if ( $num_tables > 0 ) {
$tab_export['link'] = 'db_details_export.php'; $tab_export['link'] = 'db_export.php';
$tab_search['link'] = 'db_search.php'; $tab_search['link'] = 'db_search.php';
$tab_qbe['link'] = 'db_details_qbe.php'; $tab_qbe['link'] = 'db_qbe.php';
} }
$tab_structure['link'] = 'db_details_structure.php'; $tab_structure['link'] = 'db_structure.php';
$tab_structure['text'] = $GLOBALS['strStructure']; $tab_structure['text'] = $GLOBALS['strStructure'];
$tab_structure['icon'] = 'b_props.png'; $tab_structure['icon'] = 'b_props.png';
$tab_sql['link'] = 'db_details.php'; $tab_sql['link'] = 'db_sql.php';
$tab_sql['args']['db_query_force'] = 1; $tab_sql['args']['db_query_force'] = 1;
$tab_sql['text'] = $GLOBALS['strSQL']; $tab_sql['text'] = $GLOBALS['strSQL'];
$tab_sql['icon'] = 'b_sql.png'; $tab_sql['icon'] = 'b_sql.png';

View File

@@ -29,7 +29,7 @@ if (empty($is_db)) {
} // end if (ensures db exists) } // end if (ensures db exists)
if (empty($is_table) && !defined('PMA_SUBMIT_MULT')) { if (empty($is_table) && !defined('PMA_SUBMIT_MULT')) {
// Not a valid table name -> back to the db_details.php // Not a valid table name -> back to the db_sql.php
if (isset($table) && strlen($table)) { if (isset($table) && strlen($table)) {
$_result = PMA_DBI_try_query( $_result = PMA_DBI_try_query(
'SHOW TABLES LIKE \'' . PMA_sqlAddslashes($table, true) . '\';', 'SHOW TABLES LIKE \'' . PMA_sqlAddslashes($table, true) . '\';',
@@ -69,7 +69,7 @@ if (empty($is_table) && !defined('PMA_SUBMIT_MULT')) {
$url_params['display_query'] = $display_query; $url_params['display_query'] = $display_query;
} }
PMA_sendHeaderLocation( PMA_sendHeaderLocation(
$cfg['PmaAbsoluteUri'] . 'db_details.php' $cfg['PmaAbsoluteUri'] . 'db_sql.php'
. PMA_generate_common_url($url_params, '&')); . PMA_generate_common_url($url_params, '&'));
} }
} }

View File

@@ -131,7 +131,7 @@ if ( !empty($submit_mult) && !empty($what)) {
$url_query .= '&amp;goto=tbl_sql.php&amp;back=tbl_sql.php'; $url_query .= '&amp;goto=tbl_sql.php&amp;back=tbl_sql.php';
require('./libraries/tbl_info.inc.php'); require('./libraries/tbl_info.inc.php');
} elseif (isset($db) && strlen($db)) { } elseif (isset($db) && strlen($db)) {
require('./libraries/db_details_common.inc.php'); require('./libraries/db_common.inc.php');
require('./libraries/db_info.inc.php'); require('./libraries/db_info.inc.php');
} }
// Builds the query // Builds the query
@@ -229,7 +229,7 @@ if ( !empty($submit_mult) && !empty($what)) {
<form action="<?php echo $action; ?>" method="post"> <form action="<?php echo $action; ?>" method="post">
<input type="hidden" name="query_type" value="<?php echo $what; ?>" /> <input type="hidden" name="query_type" value="<?php echo $what; ?>" />
<?php <?php
if (strpos(' ' . $action, 'db_details') == 1) { if (strpos(' ' . $action, 'db_') == 1) {
echo PMA_generate_common_hidden_inputs($db); echo PMA_generate_common_hidden_inputs($db);
} elseif (strpos(' ' . $action, 'tbl_') == 1 } elseif (strpos(' ' . $action, 'tbl_') == 1
|| $what == 'row_delete') { || $what == 'row_delete') {

View File

@@ -5,7 +5,7 @@
* functions for displaying the sql query form * functions for displaying the sql query form
* *
* @usedby server_sql.php * @usedby server_sql.php
* @usedby db_details.php * @usedby db_sql.php
* @usedby tbl_sql.php * @usedby tbl_sql.php
* @usedby tbl_structure.php * @usedby tbl_structure.php
* @usedby querywindow.php * @usedby querywindow.php
@@ -18,7 +18,7 @@ require_once './libraries/bookmark.lib.php'; // used for file listing
* prints the sql query boxes * prints the sql query boxes
* *
* @usedby server_sql.php * @usedby server_sql.php
* @usedby db_details.php * @usedby db_sql.php
* @usedby tbl_sql.php * @usedby tbl_sql.php
* @usedby tbl_structure.php * @usedby tbl_structure.php
* @usedby querywindow.php * @usedby querywindow.php
@@ -90,7 +90,7 @@ function PMA_sqlQueryForm($query = true, $display_tab = false)
// prepare for db related // prepare for db related
$db = $GLOBALS['db']; $db = $GLOBALS['db'];
$goto = empty($GLOBALS['goto']) ? $goto = empty($GLOBALS['goto']) ?
'db_details.php' : $GLOBALS['goto']; 'db_sql.php' : $GLOBALS['goto'];
} else { } else {
$table = $GLOBALS['table']; $table = $GLOBALS['table'];
$db = $GLOBALS['db']; $db = $GLOBALS['db'];

View File

@@ -105,7 +105,7 @@ if ( ! (isset($db_is_information_schema) && $db_is_information_schema) ) {
$tabs['drop']['args']['purge'] = 1; $tabs['drop']['args']['purge'] = 1;
$drop_command = 'DROP ' . ($tbl_is_view ? 'VIEW' : 'TABLE'); $drop_command = 'DROP ' . ($tbl_is_view ? 'VIEW' : 'TABLE');
$tabs['drop']['args']['sql_query'] = $drop_command . ' ' . PMA_backquote($table); $tabs['drop']['args']['sql_query'] = $drop_command . ' ' . PMA_backquote($table);
$tabs['drop']['args']['goto'] = 'db_details_structure.php'; $tabs['drop']['args']['goto'] = 'db_structure.php';
$tabs['drop']['args']['zero_rows'] = sprintf(($tbl_is_view ? $strViewHasBeenDropped : $strTableHasBeenDropped), htmlspecialchars($table)); $tabs['drop']['args']['zero_rows'] = sprintf(($tbl_is_view ? $strViewHasBeenDropped : $strTableHasBeenDropped), htmlspecialchars($table));
$tabs['drop']['attr'] = 'onclick="return confirmLink(this, \'' . $drop_command . ' ' . PMA_jsFormat($table) . '\')"'; $tabs['drop']['attr'] = 'onclick="return confirmLink(this, \'' . $drop_command . ' ' . PMA_jsFormat($table) . '\')"';
unset($drop_command); unset($drop_command);

View File

@@ -6,7 +6,7 @@
* Gets some core libraries * Gets some core libraries
*/ */
require_once('./libraries/common.lib.php'); require_once('./libraries/common.lib.php');
require_once('./libraries/db_details_common.inc.php'); require_once('./libraries/db_common.inc.php');
/** /**

View File

@@ -245,7 +245,7 @@ class PMA_PDF extends PMA_FPDF {
echo ' ' . $error_message . "\n"; echo ' ' . $error_message . "\n";
echo '</p>' . "\n"; echo '</p>' . "\n";
echo '<a href="db_details_structure.php?' . PMA_generate_common_url($db) echo '<a href="db_structure.php?' . PMA_generate_common_url($db)
. '">' . $GLOBALS['strBack'] . '</a>'; . '">' . $GLOBALS['strBack'] . '</a>';
echo "\n"; echo "\n";

View File

@@ -229,7 +229,7 @@ if (isset($no_js) && $no_js) {
if ( isset( $table ) && strlen($table) ) { if ( isset( $table ) && strlen($table) ) {
require './tbl_sql.php'; require './tbl_sql.php';
} elseif ( isset($db) && strlen($db) ) { } elseif ( isset($db) && strlen($db) ) {
require './db_details.php'; require './db_sql.php';
} else { } else {
require './server_sql.php'; require './server_sql.php';
} }

View File

@@ -1042,7 +1042,7 @@ function show_tabs_form($defaults = array()) {
echo get_hidden_cfg(); echo get_hidden_cfg();
show_config_form(array( show_config_form(array(
array('Default tab for server', 'DefaultTabServer', 'Tab that is displayed when entering server', array('main.php', 'server_databases.php', 'server_status.php', 'server_variables.php', 'server_privileges.php', 'server_processlist.php')), array('Default tab for server', 'DefaultTabServer', 'Tab that is displayed when entering server', array('main.php', 'server_databases.php', 'server_status.php', 'server_variables.php', 'server_privileges.php', 'server_processlist.php')),
array('Default tab for database', 'DefaultTabDatabase', 'Tab that is displayed when entering database', array('db_details_structure.php', 'db_details.php', 'db_search.php', 'db_operations.php')), array('Default tab for database', 'DefaultTabDatabase', 'Tab that is displayed when entering database', array('db_structure.php', 'db_sql.php', 'db_search.php', 'db_operations.php')),
array('Default tab for table', 'DefaultTabTable', 'Tab that is displayed when entering table', array('tbl_structure.php', 'sql.php', 'tbl_sql.php', 'tbl_select.php', 'tbl_change.php')), array('Default tab for table', 'DefaultTabTable', 'Tab that is displayed when entering table', array('tbl_structure.php', 'sql.php', 'tbl_sql.php', 'tbl_select.php', 'tbl_change.php')),
array('Use lighter tabs', 'LightTabs', 'If you want simpler tabs enable this', FALSE), array('Use lighter tabs', 'LightTabs', 'If you want simpler tabs enable this', FALSE),
), ),

View File

@@ -32,7 +32,7 @@ $multi_values .= '</select></div>';
$checkall_url = 'server_export.php?' $checkall_url = 'server_export.php?'
. PMA_generate_common_url() . PMA_generate_common_url()
. '&amp;goto=db_details_export.php'; . '&amp;goto=db_export.php';
$multi_values .= '<br /> $multi_values .= '<br />
<a href="' . $checkall_url . '&amp;selectall=1" onclick="setSelectOptions(\'dump\', \'db_select[]\', true); return false;">' . $strSelectAll . '</a> <a href="' . $checkall_url . '&amp;selectall=1" onclick="setSelectOptions(\'dump\', \'db_select[]\', true); return false;">' . $strSelectAll . '</a>

16
sql.php
View File

@@ -42,7 +42,7 @@ if (empty($goto)) {
if (!isset($err_url)) { if (!isset($err_url)) {
$err_url = (!empty($back) ? $back : $goto) $err_url = (!empty($back) ? $back : $goto)
. '?' . PMA_generate_common_url(isset($db) ? $db : '') . '?' . PMA_generate_common_url(isset($db) ? $db : '')
. ((strpos(' ' . $goto, 'db_details') != 1 && isset($table)) ? '&amp;table=' . urlencode($table) : ''); . ((strpos(' ' . $goto, 'db_') != 1 && isset($table)) ? '&amp;table=' . urlencode($table) : '');
} // end if } // end if
// Coming from a bookmark dialog // Coming from a bookmark dialog
@@ -155,7 +155,7 @@ if (isset($btnDrop) && $btnDrop == $strNo) {
$goto = $back; $goto = $back;
} }
if ($is_gotofile) { if ($is_gotofile) {
if (strpos(' ' . $goto, 'db_details') == 1 && isset($table) && strlen($table)) { if (strpos(' ' . $goto, 'db_') == 1 && isset($table) && strlen($table)) {
unset($table); unset($table);
} }
$active_page = $goto; $active_page = $goto;
@@ -368,7 +368,7 @@ if (isset($GLOBALS['show_as_php']) || !empty($GLOBALS['validatequery'])) {
// Displays an error message if required and stop parsing the script // Displays an error message if required and stop parsing the script
if ($error = PMA_DBI_getError()) { if ($error = PMA_DBI_getError()) {
require_once './libraries/header.inc.php'; require_once './libraries/header.inc.php';
$full_err_url = (preg_match('@^(db_details|tbl_)@', $err_url)) $full_err_url = (preg_match('@^(db|tbl)_@', $err_url))
? $err_url . '&amp;show_query=1&amp;sql_query=' . urlencode($sql_query) ? $err_url . '&amp;show_query=1&amp;sql_query=' . urlencode($sql_query)
: $err_url; : $err_url;
PMA_mysqlDie($error, $full_sql_query, '', $full_err_url); PMA_mysqlDie($error, $full_sql_query, '', $full_err_url);
@@ -602,7 +602,7 @@ if ($num_rows < 1 || $is_affected) {
// Ok, here is an explanation for the !$is_select. // Ok, here is an explanation for the !$is_select.
// The form generated by sql_query_form.lib.php // The form generated by sql_query_form.lib.php
// and db_details.php has many submit buttons // and db_sql.php has many submit buttons
// on the same form, and some confusion arises from the // on the same form, and some confusion arises from the
// fact that $zero_rows is sent for every case. // fact that $zero_rows is sent for every case.
// The $zero_rows containing $strSuccess and sent with // The $zero_rows containing $strSuccess and sent with
@@ -629,16 +629,16 @@ if ($num_rows < 1 || $is_affected) {
if (isset($table)) { if (isset($table)) {
unset($table); unset($table);
} }
$goto = 'db_details.php'; $goto = 'db_sql.php';
} }
if (strpos($goto, 'db_details') === 0 && ! $is_db) { if (strpos($goto, 'db_') === 0 && ! $is_db) {
if (isset($db)) { if (isset($db)) {
unset($db); unset($db);
} }
$goto = 'main.php'; $goto = 'main.php';
} }
// Loads to target script // Loads to target script
if (strpos($goto, 'db_details') === 0 if (strpos($goto, 'db_') === 0
|| strpos($goto, 'tbl_') === 0) { || strpos($goto, 'tbl_') === 0) {
$js_to_run = 'functions.js'; $js_to_run = 'functions.js';
} }
@@ -670,7 +670,7 @@ else {
require './libraries/tbl_info.inc.php'; require './libraries/tbl_info.inc.php';
require './libraries/tbl_links.inc.php'; require './libraries/tbl_links.inc.php';
} elseif (isset($db) && strlen($db)) { } elseif (isset($db) && strlen($db)) {
require './libraries/db_details_common.inc.php'; require './libraries/db_common.inc.php';
require './libraries/db_info.inc.php'; require './libraries/db_info.inc.php';
} else { } else {
require './libraries/server_common.inc.php'; require './libraries/server_common.inc.php';

View File

@@ -78,12 +78,12 @@ if (!empty($disp_message)) {
* (at this point, $goto might be set but empty) * (at this point, $goto might be set but empty)
*/ */
if (empty($goto)) { if (empty($goto)) {
$goto = 'db_details.php'; $goto = 'db_sql.php';
} }
/** /**
* @todo check if we could replace by "db_details|tbl" * @todo check if we could replace by "db_|tbl_"
*/ */
if (!preg_match('@^(db_details|tbl_)@', $goto)) { if (!preg_match('@^(db|tbl)_@', $goto)) {
$err_url = $goto . "?" . PMA_generate_common_url($db) . "&amp;sql_query=" . urlencode($sql_query); $err_url = $goto . "?" . PMA_generate_common_url($db) . "&amp;sql_query=" . urlencode($sql_query);
} else { } else {
$err_url = $goto . '?' $err_url = $goto . '?'

View File

@@ -33,7 +33,7 @@ if (!defined('PMA_IDX_INCLUDED')) {
. PMA_generate_common_url($uri_params, '&')); . PMA_generate_common_url($uri_params, '&'));
exit; exit;
} }
// Not a valid table name -> back to the default db_details sub-page // Not a valid table name -> back to the default db sub-page
if ( isset($table) && strlen($table) ) { if ( isset($table) && strlen($table) ) {
$is_table = PMA_DBI_query('SHOW TABLES LIKE \'' $is_table = PMA_DBI_query('SHOW TABLES LIKE \''
. PMA_sqlAddslashes($table, TRUE) . '\'', null, PMA_DBI_QUERY_STORE); . PMA_sqlAddslashes($table, TRUE) . '\'', null, PMA_DBI_QUERY_STORE);
@@ -64,7 +64,7 @@ if (!defined('PMA_IDX_INCLUDED')) {
* Gets fields and indexes informations * Gets fields and indexes informations
*/ */
if (!defined('PMA_IDX_INCLUDED')) { if (!defined('PMA_IDX_INCLUDED')) {
$err_url_0 = 'db_details.php?' . PMA_generate_common_url($db); $err_url_0 = 'db_sql.php?' . PMA_generate_common_url($db);
} }
// Gets table keys and store them in arrays // Gets table keys and store them in arrays

View File

@@ -34,7 +34,7 @@ $cfgRelation = PMA_getRelationsParam();
if (isset($table)) { if (isset($table)) {
$err_url = 'tbl_sql.php?' . PMA_generate_common_url($db, $table); $err_url = 'tbl_sql.php?' . PMA_generate_common_url($db, $table);
} else { } else {
$err_url = 'db_details.php?' . PMA_generate_common_url($db); $err_url = 'db_sql.php?' . PMA_generate_common_url($db);
} }

View File

@@ -86,7 +86,7 @@ if (isset($after_insert) && $after_insert == 'new_insert') {
// Security checkings // Security checkings
$is_gotofile = preg_replace('@^([^?]+).*$@', '\\1', $goto); $is_gotofile = preg_replace('@^([^?]+).*$@', '\\1', $goto);
if (!@file_exists('./' . $is_gotofile)) { if (!@file_exists('./' . $is_gotofile)) {
$goto = (! isset($table) || ! strlen($table)) ? 'db_details.php' : 'tbl_sql.php'; $goto = (! isset($table) || ! strlen($table)) ? 'db_sql.php' : 'tbl_sql.php';
$is_gotofile = TRUE; $is_gotofile = TRUE;
} else { } else {
$is_gotofile = ($is_gotofile == $goto); $is_gotofile = ($is_gotofile == $goto);
@@ -283,7 +283,7 @@ if (!empty($warning_message)) {
} }
if ($is_gotofile) { if ($is_gotofile) {
if ($goto == 'db_details.php' && isset($table)) { if ($goto == 'db_sql.php' && isset($table)) {
unset($table); unset($table);
} }
$js_to_run = 'functions.js'; $js_to_run = 'functions.js';