Rename db_* files to drop useless _details part.
This commit is contained in:
@@ -9,7 +9,9 @@ $HeadURL$
|
||||
* Documentation.html, libraries/tbl_properties.inc.php,
|
||||
libraries/config.default.php: Allow to edit small number of fields
|
||||
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>
|
||||
* libraries/common.lib.php, /database_interface.lib.php,/session.inc.php:
|
||||
|
@@ -1335,8 +1335,8 @@ ALTER TABLE `pma_column_comments`
|
||||
|
||||
<dt id="cfg_DefaultTabDatabase">$cfg['DefaultTabDatabase'] string</dt>
|
||||
<dd>Defines the tab displayed by default on database view. Possible
|
||||
values: "db_details_structure.php",
|
||||
"db_details.php" or "db_search.php".</dd>
|
||||
values: "db_structure.php",
|
||||
"db_sql.php" or "db_search.php".</dd>
|
||||
|
||||
<dt id="cfg_DefaultTabTable">$cfg['DefaultTabTable'] string</dt>
|
||||
<dd>Defines the tab displayed by default on table view. Possible
|
||||
@@ -2550,7 +2550,7 @@ ALTER TABLE `pma_column_comments`
|
||||
|
||||
<h4 id="faq1_27">
|
||||
<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
|
||||
GZIP output buffering is enabled. If you turn off it (by
|
||||
|
@@ -7,7 +7,7 @@
|
||||
* Gets some core libraries
|
||||
*/
|
||||
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');
|
||||
|
||||
|
||||
|
@@ -31,7 +31,7 @@ PMA_checkParameters(array('db'));
|
||||
if (isset($table)) {
|
||||
$err_url = 'tbl_sql.php?' . PMA_generate_common_url($db, $table);
|
||||
} else {
|
||||
$err_url = 'db_details.php?' . PMA_generate_common_url($db);
|
||||
$err_url = 'db_sql.php?' . PMA_generate_common_url($db);
|
||||
}
|
||||
|
||||
if ($cfgRelation['commwork']) {
|
||||
|
@@ -4,7 +4,7 @@
|
||||
/**
|
||||
* dumps a database
|
||||
*
|
||||
* @uses libraries/db_details_common.inc.php
|
||||
* @uses libraries/db_common.inc.php
|
||||
* @uses libraries/db_info.inc.php
|
||||
* @uses libraries/display_export.lib.php
|
||||
* @uses $tables from libraries/db_info.inc.php
|
||||
@@ -16,8 +16,8 @@
|
||||
require_once('./libraries/common.lib.php');
|
||||
|
||||
$sub_part = '_export';
|
||||
require_once('./libraries/db_details_common.inc.php');
|
||||
$url_query .= '&goto=db_details_export.php';
|
||||
require_once('./libraries/db_common.inc.php');
|
||||
$url_query .= '&goto=db_export.php';
|
||||
require_once('./libraries/db_info.inc.php');
|
||||
|
||||
/**
|
||||
@@ -55,9 +55,9 @@ foreach ( $tables as $each_table ) {
|
||||
$multi_values .= "\n";
|
||||
$multi_values .= '</select></div>';
|
||||
|
||||
$checkall_url = 'db_details_export.php?'
|
||||
$checkall_url = 'db_export.php?'
|
||||
. PMA_generate_common_url( $db )
|
||||
. '&goto=db_details_export.php';
|
||||
. '&goto=db_export.php';
|
||||
|
||||
$multi_values .= '<br />
|
||||
<a href="' . $checkall_url . '" onclick="setSelectOptions(\'dump\', \'table_select[]\', true); return false;">' . $strSelectAll . '</a>
|
@@ -7,7 +7,7 @@ require_once('./libraries/common.lib.php');
|
||||
/**
|
||||
* 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');
|
||||
|
||||
$import_type = 'database';
|
||||
|
@@ -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); ?>
|
||||
<input type="hidden" name="submit_show" value="true" />
|
||||
<input type="hidden" name="do" value="import" />
|
@@ -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)
|
||||
*/
|
||||
if (empty($is_info)) {
|
||||
require './libraries/db_details_common.inc.php';
|
||||
require './libraries/db_common.inc.php';
|
||||
$url_query .= '&goto=db_operations.php';
|
||||
|
||||
// Gets the database structure
|
||||
@@ -475,7 +475,7 @@ if ($num_tables > 0
|
||||
* import docSQL files
|
||||
*/
|
||||
echo '<ul>' . "\n"
|
||||
.'<li><a href="db_details_importdocsql.php?' . $takeaway . '">' . "\n";
|
||||
.'<li><a href="db_importdocsql.php?' . $takeaway . '">' . "\n";
|
||||
if ($cfg['PropertiesIconic']) {
|
||||
echo '<img class="icon" src="' . $pmaThemeImage . 'b_docsql.png"'
|
||||
.' alt="" width="16" height="16" />';
|
||||
|
@@ -15,7 +15,7 @@ PMA_checkParameters(array('db'));
|
||||
/**
|
||||
* 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
|
||||
|
@@ -25,16 +25,16 @@ $cfgRelation = PMA_getRelationsParam();
|
||||
*/
|
||||
if (isset($_REQUEST['submit_sql'])
|
||||
&& preg_match('@^SELECT@i', $_REQUEST['encoded_sql_query'])) {
|
||||
$goto = 'db_details.php';
|
||||
$goto = 'db_sql.php';
|
||||
$zero_rows = htmlspecialchars($GLOBALS['strSuccess']);
|
||||
$sql_query = urldecode($_REQUEST['encoded_sql_query']);
|
||||
require './sql.php';
|
||||
exit;
|
||||
} else {
|
||||
$sub_part = '_qbe';
|
||||
require './libraries/db_details_common.inc.php';
|
||||
$url_query .= '&goto=db_details_qbe.php';
|
||||
$url_params['goto'] = 'db_details_qbe.php';
|
||||
require './libraries/db_common.inc.php';
|
||||
$url_query .= '&goto=db_qbe.php';
|
||||
$url_params['goto'] = 'db_qbe.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%;">
|
||||
<tr class="odd noclick">
|
||||
<th><?php echo $strField; ?>:</th>
|
@@ -10,7 +10,7 @@ require_once('./libraries/common.lib.php');
|
||||
/**
|
||||
* 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 (!$cfg['UseDbSearch']) {
|
||||
PMA_mysqlDie($strAccessDenied, '', FALSE, $err_url);
|
||||
@@ -28,7 +28,7 @@ $num_tables = count( $tables );
|
||||
* Displays top links
|
||||
*/
|
||||
$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(
|
||||
'db' => $GLOBALS['db'],
|
||||
'goto' => 'db_details.php',
|
||||
'goto' => 'db_sql.php',
|
||||
'pos' => 0,
|
||||
'is_js_confirmed' => 0,
|
||||
);
|
||||
|
@@ -7,18 +7,18 @@ require_once('./libraries/common.lib.php');
|
||||
/**
|
||||
* Runs common work
|
||||
*/
|
||||
require('./libraries/db_details_common.inc.php');
|
||||
require('./libraries/db_common.inc.php');
|
||||
require_once './libraries/sql_query_form.lib.php';
|
||||
|
||||
/**
|
||||
* 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');
|
||||
if ( $num_tables == 0 && empty( $db_query_force ) ) {
|
||||
$sub_part = '';
|
||||
$is_info = TRUE;
|
||||
require './db_details_structure.php';
|
||||
require './db_structure.php';
|
||||
exit();
|
||||
}
|
||||
|
@@ -13,13 +13,13 @@ if (empty($is_info)) {
|
||||
// Drops/deletes/etc. multiple tables if required
|
||||
if ((!empty($submit_mult) && isset($selected_tbl))
|
||||
|| isset($mult_btn)) {
|
||||
$action = 'db_details_structure.php';
|
||||
$err_url = 'db_details_structure.php?'. PMA_generate_common_url($db);
|
||||
$action = 'db_structure.php';
|
||||
$err_url = 'db_structure.php?'. PMA_generate_common_url($db);
|
||||
require './libraries/mult_submits.inc.php';
|
||||
$message = $strSuccess;
|
||||
}
|
||||
require './libraries/db_details_common.inc.php';
|
||||
$url_query .= '&goto=db_details_structure.php';
|
||||
require './libraries/db_common.inc.php';
|
||||
$url_query .= '&goto=db_structure.php';
|
||||
|
||||
// Gets the database structure
|
||||
$sub_part = '_structure';
|
||||
@@ -155,7 +155,7 @@ if (true == $cfg['PropertiesIconic']) {
|
||||
* 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
|
||||
echo PMA_generate_common_hidden_inputs($db);
|
||||
|
||||
@@ -435,7 +435,7 @@ if ($is_show_stats) {
|
||||
<div class="clearfloat">
|
||||
<?php
|
||||
// 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'; ?>"
|
||||
width="38" height="22" alt="<?php echo $strWithChecked; ?>" />
|
22
export.php
22
export.php
@@ -32,8 +32,8 @@ if (isset($export_list[$type]['force_file']) && ! isset($asfile)) {
|
||||
$active_page = 'server_export.php';
|
||||
require('./server_export.php');
|
||||
} elseif ($export_type == 'database') {
|
||||
$active_page = 'db_details_export.php';
|
||||
require('./db_details_export.php');
|
||||
$active_page = 'db_export.php';
|
||||
require('./db_export.php');
|
||||
} else {
|
||||
$active_page = 'tbl_export.php';
|
||||
require('./tbl_export.php');
|
||||
@@ -45,7 +45,7 @@ if (isset($export_list[$type]['force_file']) && ! isset($asfile)) {
|
||||
if ($export_type == 'server') {
|
||||
$err_url = 'server_export.php?' . PMA_generate_common_url();
|
||||
} 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)) {
|
||||
$err_url = 'tbl_export.php?' . PMA_generate_common_url($db, $table);
|
||||
} else {
|
||||
@@ -300,8 +300,8 @@ if ($save_on_server) {
|
||||
$active_page = 'server_export.php';
|
||||
require('./server_export.php');
|
||||
} elseif ($export_type == 'database') {
|
||||
$active_page = 'db_details_export.php';
|
||||
require('./db_details_export.php');
|
||||
$active_page = 'db_export.php';
|
||||
require('./db_export.php');
|
||||
} else {
|
||||
$active_page = 'tbl_export.php';
|
||||
require('./tbl_export.php');
|
||||
@@ -349,8 +349,8 @@ if (!$save_on_server) {
|
||||
$message = $strNoTablesFound;
|
||||
$js_to_run = 'functions.js';
|
||||
require_once('./libraries/header.inc.php');
|
||||
$active_page = 'db_details_export.php';
|
||||
require('./db_details_export.php');
|
||||
$active_page = 'db_export.php';
|
||||
require('./db_export.php');
|
||||
exit();
|
||||
}
|
||||
}
|
||||
@@ -549,8 +549,8 @@ if ($save_on_server && isset($message)) {
|
||||
$active_page = 'server_export.php';
|
||||
require('./server_export.php');
|
||||
} elseif ($export_type == 'database') {
|
||||
$active_page = 'db_details_export.php';
|
||||
require('./db_details_export.php');
|
||||
$active_page = 'db_export.php';
|
||||
require('./db_export.php');
|
||||
} else {
|
||||
$active_page = 'tbl_export.php';
|
||||
require('./tbl_export.php');
|
||||
@@ -611,8 +611,8 @@ if (!empty($asfile)) {
|
||||
$active_page = 'server_export.php';
|
||||
require_once('./server_export.php');
|
||||
} elseif ($export_type == 'database') {
|
||||
$active_page = 'db_details_export.php';
|
||||
require_once('./db_details_export.php');
|
||||
$active_page = 'db_export.php';
|
||||
require_once('./db_export.php');
|
||||
} else {
|
||||
$active_page = 'tbl_export.php';
|
||||
require_once('./tbl_export.php');
|
||||
|
@@ -77,7 +77,7 @@ if ($import_type == 'table') {
|
||||
if (isset($table) && isset($db)) {
|
||||
$goto = 'tbl_structure.php';
|
||||
} elseif (isset($db)) {
|
||||
$goto = 'db_details_structure.php';
|
||||
$goto = 'db_structure.php';
|
||||
} else {
|
||||
$goto = 'server_sql.php';
|
||||
}
|
||||
|
@@ -746,7 +746,7 @@ if (!defined('PMA_MINIMUM_COMMON')) {
|
||||
if (isset($table)) {
|
||||
$doedit_goto = '<a href="tbl_sql.php?' . PMA_generate_common_url($db, $table) . '&sql_query=' . urlencode($the_query) . '&show_query=1">';
|
||||
} else {
|
||||
$doedit_goto = '<a href="db_details.php?' . PMA_generate_common_url($db) . '&sql_query=' . urlencode($the_query) . '&show_query=1">';
|
||||
$doedit_goto = '<a href="db_sql.php?' . PMA_generate_common_url($db) . '&sql_query=' . urlencode($the_query) . '&show_query=1">';
|
||||
}
|
||||
if ($GLOBALS['cfg']['PropertiesIconic']) {
|
||||
echo $doedit_goto
|
||||
@@ -1371,7 +1371,7 @@ window.parent.updateTableTitle('<?php echo $uni_tbl; ?>', '<?php echo PMA_jsForm
|
||||
|
||||
//if (!isset($GLOBALS['goto'])) {
|
||||
//$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') {
|
||||
// $edit_target = $GLOBALS['goto'];
|
||||
//} else {
|
||||
@@ -2574,11 +2574,11 @@ $goto_whitelist = array(
|
||||
//'chk_rel.php',
|
||||
'db_create.php',
|
||||
'db_datadict.php',
|
||||
'db_details.php',
|
||||
'db_details_export.php',
|
||||
'db_details_importdocsql.php',
|
||||
'db_details_qbe.php',
|
||||
'db_details_structure.php',
|
||||
'db_sql.php',
|
||||
'db_export.php',
|
||||
'db_importdocsql.php',
|
||||
'db_qbe.php',
|
||||
'db_structure.php',
|
||||
'db_import.php',
|
||||
'db_operations.php',
|
||||
'db_printview.php',
|
||||
|
@@ -161,7 +161,7 @@ $cfg['LeftFrameTableLevel'] = '1'; // How many sublevels should be display
|
||||
// up tables by the above Separator
|
||||
$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['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
|
||||
// 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_privileges.php' = user management
|
||||
// 'server_processlist.php' = process list
|
||||
$cfg['DefaultTabDatabase'] = 'db_details_structure.php';
|
||||
$cfg['DefaultTabDatabase'] = 'db_structure.php';
|
||||
// Possible values:
|
||||
// 'db_details_structure.php' = tables list
|
||||
// 'db_details.php' = sql form
|
||||
// 'db_structure.php' = tables list
|
||||
// 'db_sql.php' = sql form
|
||||
// 'db_search.php' = search query
|
||||
// 'db_operations.php' = operations on database
|
||||
$cfg['DefaultTabTable'] = 'tbl_structure.php';
|
||||
|
@@ -136,5 +136,5 @@ $num_tables = count( $tables );
|
||||
/**
|
||||
* Displays top menu links
|
||||
*/
|
||||
require('./libraries/db_details_links.inc.php');
|
||||
require('./libraries/db_links.inc.php');
|
||||
?>
|
||||
|
@@ -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']['zero_rows'] = sprintf($GLOBALS['strDatabaseHasBeenDropped'], htmlspecialchars(PMA_backquote($db)));
|
||||
$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']['purge'] = 1;
|
||||
$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
|
||||
*/
|
||||
if ( $num_tables > 0 ) {
|
||||
$tab_export['link'] = 'db_details_export.php';
|
||||
$tab_export['link'] = 'db_export.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['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['text'] = $GLOBALS['strSQL'];
|
||||
$tab_sql['icon'] = 'b_sql.png';
|
@@ -29,7 +29,7 @@ if (empty($is_db)) {
|
||||
} // end if (ensures db exists)
|
||||
|
||||
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)) {
|
||||
$_result = PMA_DBI_try_query(
|
||||
'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;
|
||||
}
|
||||
PMA_sendHeaderLocation(
|
||||
$cfg['PmaAbsoluteUri'] . 'db_details.php'
|
||||
$cfg['PmaAbsoluteUri'] . 'db_sql.php'
|
||||
. PMA_generate_common_url($url_params, '&'));
|
||||
}
|
||||
}
|
||||
|
@@ -131,7 +131,7 @@ if ( !empty($submit_mult) && !empty($what)) {
|
||||
$url_query .= '&goto=tbl_sql.php&back=tbl_sql.php';
|
||||
require('./libraries/tbl_info.inc.php');
|
||||
} elseif (isset($db) && strlen($db)) {
|
||||
require('./libraries/db_details_common.inc.php');
|
||||
require('./libraries/db_common.inc.php');
|
||||
require('./libraries/db_info.inc.php');
|
||||
}
|
||||
// Builds the query
|
||||
@@ -229,7 +229,7 @@ if ( !empty($submit_mult) && !empty($what)) {
|
||||
<form action="<?php echo $action; ?>" method="post">
|
||||
<input type="hidden" name="query_type" value="<?php echo $what; ?>" />
|
||||
<?php
|
||||
if (strpos(' ' . $action, 'db_details') == 1) {
|
||||
if (strpos(' ' . $action, 'db_') == 1) {
|
||||
echo PMA_generate_common_hidden_inputs($db);
|
||||
} elseif (strpos(' ' . $action, 'tbl_') == 1
|
||||
|| $what == 'row_delete') {
|
||||
|
@@ -5,7 +5,7 @@
|
||||
* functions for displaying the sql query form
|
||||
*
|
||||
* @usedby server_sql.php
|
||||
* @usedby db_details.php
|
||||
* @usedby db_sql.php
|
||||
* @usedby tbl_sql.php
|
||||
* @usedby tbl_structure.php
|
||||
* @usedby querywindow.php
|
||||
@@ -18,7 +18,7 @@ require_once './libraries/bookmark.lib.php'; // used for file listing
|
||||
* prints the sql query boxes
|
||||
*
|
||||
* @usedby server_sql.php
|
||||
* @usedby db_details.php
|
||||
* @usedby db_sql.php
|
||||
* @usedby tbl_sql.php
|
||||
* @usedby tbl_structure.php
|
||||
* @usedby querywindow.php
|
||||
@@ -90,7 +90,7 @@ function PMA_sqlQueryForm($query = true, $display_tab = false)
|
||||
// prepare for db related
|
||||
$db = $GLOBALS['db'];
|
||||
$goto = empty($GLOBALS['goto']) ?
|
||||
'db_details.php' : $GLOBALS['goto'];
|
||||
'db_sql.php' : $GLOBALS['goto'];
|
||||
} else {
|
||||
$table = $GLOBALS['table'];
|
||||
$db = $GLOBALS['db'];
|
||||
|
@@ -105,7 +105,7 @@ if ( ! (isset($db_is_information_schema) && $db_is_information_schema) ) {
|
||||
$tabs['drop']['args']['purge'] = 1;
|
||||
$drop_command = 'DROP ' . ($tbl_is_view ? 'VIEW' : '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']['attr'] = 'onclick="return confirmLink(this, \'' . $drop_command . ' ' . PMA_jsFormat($table) . '\')"';
|
||||
unset($drop_command);
|
||||
|
@@ -6,7 +6,7 @@
|
||||
* Gets some core libraries
|
||||
*/
|
||||
require_once('./libraries/common.lib.php');
|
||||
require_once('./libraries/db_details_common.inc.php');
|
||||
require_once('./libraries/db_common.inc.php');
|
||||
|
||||
|
||||
/**
|
||||
|
@@ -245,7 +245,7 @@ class PMA_PDF extends PMA_FPDF {
|
||||
echo ' ' . $error_message . "\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>';
|
||||
echo "\n";
|
||||
|
||||
|
@@ -229,7 +229,7 @@ if (isset($no_js) && $no_js) {
|
||||
if ( isset( $table ) && strlen($table) ) {
|
||||
require './tbl_sql.php';
|
||||
} elseif ( isset($db) && strlen($db) ) {
|
||||
require './db_details.php';
|
||||
require './db_sql.php';
|
||||
} else {
|
||||
require './server_sql.php';
|
||||
}
|
||||
|
@@ -1042,7 +1042,7 @@ function show_tabs_form($defaults = array()) {
|
||||
echo get_hidden_cfg();
|
||||
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 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('Use lighter tabs', 'LightTabs', 'If you want simpler tabs enable this', FALSE),
|
||||
),
|
||||
|
@@ -32,7 +32,7 @@ $multi_values .= '</select></div>';
|
||||
|
||||
$checkall_url = 'server_export.php?'
|
||||
. PMA_generate_common_url()
|
||||
. '&goto=db_details_export.php';
|
||||
. '&goto=db_export.php';
|
||||
|
||||
$multi_values .= '<br />
|
||||
<a href="' . $checkall_url . '&selectall=1" onclick="setSelectOptions(\'dump\', \'db_select[]\', true); return false;">' . $strSelectAll . '</a>
|
||||
|
16
sql.php
16
sql.php
@@ -42,7 +42,7 @@ if (empty($goto)) {
|
||||
if (!isset($err_url)) {
|
||||
$err_url = (!empty($back) ? $back : $goto)
|
||||
. '?' . PMA_generate_common_url(isset($db) ? $db : '')
|
||||
. ((strpos(' ' . $goto, 'db_details') != 1 && isset($table)) ? '&table=' . urlencode($table) : '');
|
||||
. ((strpos(' ' . $goto, 'db_') != 1 && isset($table)) ? '&table=' . urlencode($table) : '');
|
||||
} // end if
|
||||
|
||||
// Coming from a bookmark dialog
|
||||
@@ -155,7 +155,7 @@ if (isset($btnDrop) && $btnDrop == $strNo) {
|
||||
$goto = $back;
|
||||
}
|
||||
if ($is_gotofile) {
|
||||
if (strpos(' ' . $goto, 'db_details') == 1 && isset($table) && strlen($table)) {
|
||||
if (strpos(' ' . $goto, 'db_') == 1 && isset($table) && strlen($table)) {
|
||||
unset($table);
|
||||
}
|
||||
$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
|
||||
if ($error = PMA_DBI_getError()) {
|
||||
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 . '&show_query=1&sql_query=' . urlencode($sql_query)
|
||||
: $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.
|
||||
// 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
|
||||
// fact that $zero_rows is sent for every case.
|
||||
// The $zero_rows containing $strSuccess and sent with
|
||||
@@ -629,16 +629,16 @@ if ($num_rows < 1 || $is_affected) {
|
||||
if (isset($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)) {
|
||||
unset($db);
|
||||
}
|
||||
$goto = 'main.php';
|
||||
}
|
||||
// Loads to target script
|
||||
if (strpos($goto, 'db_details') === 0
|
||||
if (strpos($goto, 'db_') === 0
|
||||
|| strpos($goto, 'tbl_') === 0) {
|
||||
$js_to_run = 'functions.js';
|
||||
}
|
||||
@@ -670,7 +670,7 @@ else {
|
||||
require './libraries/tbl_info.inc.php';
|
||||
require './libraries/tbl_links.inc.php';
|
||||
} elseif (isset($db) && strlen($db)) {
|
||||
require './libraries/db_details_common.inc.php';
|
||||
require './libraries/db_common.inc.php';
|
||||
require './libraries/db_info.inc.php';
|
||||
} else {
|
||||
require './libraries/server_common.inc.php';
|
||||
|
@@ -78,12 +78,12 @@ if (!empty($disp_message)) {
|
||||
* (at this point, $goto might be set but empty)
|
||||
*/
|
||||
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) . "&sql_query=" . urlencode($sql_query);
|
||||
} else {
|
||||
$err_url = $goto . '?'
|
||||
|
@@ -33,7 +33,7 @@ if (!defined('PMA_IDX_INCLUDED')) {
|
||||
. PMA_generate_common_url($uri_params, '&'));
|
||||
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) ) {
|
||||
$is_table = PMA_DBI_query('SHOW TABLES LIKE \''
|
||||
. PMA_sqlAddslashes($table, TRUE) . '\'', null, PMA_DBI_QUERY_STORE);
|
||||
@@ -64,7 +64,7 @@ if (!defined('PMA_IDX_INCLUDED')) {
|
||||
* Gets fields and indexes informations
|
||||
*/
|
||||
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
|
||||
|
@@ -34,7 +34,7 @@ $cfgRelation = PMA_getRelationsParam();
|
||||
if (isset($table)) {
|
||||
$err_url = 'tbl_sql.php?' . PMA_generate_common_url($db, $table);
|
||||
} else {
|
||||
$err_url = 'db_details.php?' . PMA_generate_common_url($db);
|
||||
$err_url = 'db_sql.php?' . PMA_generate_common_url($db);
|
||||
}
|
||||
|
||||
|
||||
|
@@ -86,7 +86,7 @@ if (isset($after_insert) && $after_insert == 'new_insert') {
|
||||
// Security checkings
|
||||
$is_gotofile = preg_replace('@^([^?]+).*$@', '\\1', $goto);
|
||||
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;
|
||||
} else {
|
||||
$is_gotofile = ($is_gotofile == $goto);
|
||||
@@ -283,7 +283,7 @@ if (!empty($warning_message)) {
|
||||
}
|
||||
|
||||
if ($is_gotofile) {
|
||||
if ($goto == 'db_details.php' && isset($table)) {
|
||||
if ($goto == 'db_sql.php' && isset($table)) {
|
||||
unset($table);
|
||||
}
|
||||
$js_to_run = 'functions.js';
|
||||
|
Reference in New Issue
Block a user