Skip to content

Commit

Permalink
Rename db_* files to drop useless _details part.
Browse files Browse the repository at this point in the history
  • Loading branch information
nijel committed Oct 25, 2006
1 parent ad06b4a commit cac4247
Show file tree
Hide file tree
Showing 34 changed files with 93 additions and 91 deletions.
4 changes: 3 additions & 1 deletion ChangeLog
Expand Up @@ -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:
Expand Down
6 changes: 3 additions & 3 deletions Documentation.html
Expand Up @@ -1335,8 +1335,8 @@ <h2 id="config">Configuration</h2>

<dt id="cfg_DefaultTabDatabase">$cfg['DefaultTabDatabase'] string</dt>
<dd>Defines the tab displayed by default on database view. Possible
values: &quot;db_details_structure.php&quot;,
&quot;db_details.php&quot; or &quot;db_search.php&quot;.</dd>
values: &quot;db_structure.php&quot;,
&quot;db_sql.php&quot; or &quot;db_search.php&quot;.</dd>

<dt id="cfg_DefaultTabTable">$cfg['DefaultTabTable'] string</dt>
<dd>Defines the tab displayed by default on table view. Possible
Expand Down Expand Up @@ -2550,7 +2550,7 @@ <h4 id="faq1_26">

<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
Expand Down
2 changes: 1 addition & 1 deletion chk_rel.php
Expand Up @@ -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');


Expand Down
2 changes: 1 addition & 1 deletion db_datadict.php
Expand Up @@ -31,7 +31,7 @@
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']) {
Expand Down
10 changes: 5 additions & 5 deletions db_details_export.php → db_export.php
Expand Up @@ -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
Expand All @@ -16,8 +16,8 @@
require_once('./libraries/common.lib.php');

$sub_part = '_export';
require_once('./libraries/db_details_common.inc.php');
$url_query .= '&amp;goto=db_details_export.php';
require_once('./libraries/db_common.inc.php');
$url_query .= '&amp;goto=db_export.php';
require_once('./libraries/db_info.inc.php');

/**
Expand Down Expand Up @@ -55,9 +55,9 @@
$multi_values .= "\n";
$multi_values .= '</select></div>';

$checkall_url = 'db_details_export.php?'
$checkall_url = 'db_export.php?'
. PMA_generate_common_url( $db )
. '&amp;goto=db_details_export.php';
. '&amp;goto=db_export.php';

$multi_values .= '<br />
<a href="' . $checkall_url . '" onclick="setSelectOptions(\'dump\', \'table_select[]\', true); return false;">' . $strSelectAll . '</a>
Expand Down
2 changes: 1 addition & 1 deletion db_import.php
Expand Up @@ -7,7 +7,7 @@
/**
* 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';
Expand Down
2 changes: 1 addition & 1 deletion db_details_importdocsql.php → db_importdocsql.php
Expand Up @@ -207,7 +207,7 @@ function docsql_check($docpath = '', $file = '', $filename = '', $content = 'non
*/
?>

<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" />
Expand Down
4 changes: 2 additions & 2 deletions db_operations.php
Expand Up @@ -180,7 +180,7 @@
* 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 .= '&amp;goto=db_operations.php';

// Gets the database structure
Expand Down Expand Up @@ -475,7 +475,7 @@
* 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" />';
Expand Down
2 changes: 1 addition & 1 deletion db_printview.php
Expand Up @@ -15,7 +15,7 @@
/**
* 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
Expand Down
10 changes: 5 additions & 5 deletions db_details_qbe.php → db_qbe.php
Expand Up @@ -25,16 +25,16 @@
*/
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 .= '&amp;goto=db_details_qbe.php';
$url_params['goto'] = 'db_details_qbe.php';
require './libraries/db_common.inc.php';
$url_query .= '&amp;goto=db_qbe.php';
$url_params['goto'] = 'db_qbe.php';
require './libraries/db_info.inc.php';
}

Expand Down Expand Up @@ -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>
Expand Down
6 changes: 3 additions & 3 deletions db_search.php
Expand Up @@ -10,7 +10,7 @@
/**
* 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);
Expand All @@ -28,7 +28,7 @@
* Displays top links
*/
$sub_part = '';
require('./libraries/db_details_links.inc.php');
require('./libraries/db_links.inc.php');


/**
Expand Down Expand Up @@ -155,7 +155,7 @@ function PMA_getSearchSqls($table, $search_str, $search_option)

$this_url_params = array(
'db' => $GLOBALS['db'],
'goto' => 'db_details.php',
'goto' => 'db_sql.php',
'pos' => 0,
'is_js_confirmed' => 0,
);
Expand Down
6 changes: 3 additions & 3 deletions db_details.php → db_sql.php
Expand Up @@ -7,18 +7,18 @@
/**
* 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();
}

Expand Down
12 changes: 6 additions & 6 deletions db_details_structure.php → db_structure.php
Expand Up @@ -13,13 +13,13 @@
// 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 .= '&amp;goto=db_details_structure.php';
require './libraries/db_common.inc.php';
$url_query .= '&amp;goto=db_structure.php';

// Gets the database structure
$sub_part = '_structure';
Expand Down Expand Up @@ -155,7 +155,7 @@ function PMA_TableHeader($db_is_information_schema = false)
* 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);

Expand Down Expand Up @@ -435,7 +435,7 @@ function PMA_TableHeader($db_is_information_schema = false)
<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; ?>" />
Expand Down
22 changes: 11 additions & 11 deletions export.php
Expand Up @@ -32,8 +32,8 @@
$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');
Expand All @@ -45,7 +45,7 @@
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 {
Expand Down Expand Up @@ -300,8 +300,8 @@ function PMA_exportOutputHandler($line)
$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');
Expand Down Expand Up @@ -349,8 +349,8 @@ function PMA_exportOutputHandler($line)
$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();
}
}
Expand Down Expand Up @@ -549,8 +549,8 @@ function PMA_exportOutputHandler($line)
$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');
Expand Down Expand Up @@ -611,8 +611,8 @@ function PMA_exportOutputHandler($line)
$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');
Expand Down
2 changes: 1 addition & 1 deletion import.php
Expand Up @@ -77,7 +77,7 @@
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';
}
Expand Down
14 changes: 7 additions & 7 deletions libraries/common.lib.php
Expand Up @@ -746,7 +746,7 @@ function PMA_mysqlDie($error_message = '', $the_query = '',
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">';
} 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']) {
echo $doedit_goto
Expand Down Expand Up @@ -1371,7 +1371,7 @@ function PMA_showMessage($message)

//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 {
Expand Down Expand Up @@ -2574,11 +2574,11 @@ function PMA_setCookie($cookie, $value, $default = null)
//'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',
Expand Down
8 changes: 4 additions & 4 deletions libraries/config.default.php
Expand Up @@ -161,7 +161,7 @@
// 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.

Expand Down Expand Up @@ -235,10 +235,10 @@
// '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';
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion libraries/db_info.inc.php
Expand Up @@ -136,5 +136,5 @@ function fillTooltip( &$tooltip_truename, &$tooltip_aliasname, &$tmp ) {
/**
* Displays top menu links
*/
require('./libraries/db_details_links.inc.php');
require('./libraries/db_links.inc.php');
?>

0 comments on commit cac4247

Please sign in to comment.