Changed 'column_comments' to 'column_info'.

This commit is contained in:
Alexander M. Turek
2003-02-25 14:22:19 +00:00
parent a86be4b54c
commit a663294e0d
7 changed files with 49 additions and 43 deletions

View File

@@ -5,11 +5,16 @@ phpMyAdmin - Changelog
$Id$
$Source$
2003-02-24 Alexander M. Turek <rabus@users.sourceforge.net>
2003-02-25 Alexander M. Turek <rabus@users.sourceforge.net>
* lang/bulgarian-*.inc.php3, lang/czech-*.inc.php3, lang/dutch-*.inc.php3,
lang/swedish-*.inc.php3, lang/thai-*.inc.php3: Removed problematic %e from
$datefmt (translations #692065).
* lang/japanese-*.inc.php3: Fixed some inconsistences.
* config.inc.php3, db_details_importdocsql.php3, Documentation.html,
sql.php3, tbl_move_copy.php3, tbl_rename.php3,
libraries/config_import.lib.php3, libraries/relation.lib.php3,
libraries/transformations.lib.php3: Changed 'column_comments' to
'column_info'.
2003-02-25 Garvin Hicking <me@supergarv.de>
* tbl_properties.inc.php3: Fixed duped display of comments due to

View File

@@ -752,9 +752,10 @@ $cfg['PmaAbsoluteUri'] = (!empty($_SERVER['HTTPS']) ? 'https' : 'http') . '://'
<dt>
<a name="col_com"></a><br />
<b>$cfg['Servers'][$i]['column_comments']</b> string
<b>$cfg['Servers'][$i]['column_info']</b> string
</dt>
<dd>
<!-- This part requires a content update! -->
Since release 2.3.0 you can store comments to describe each column
for each table. These will then be shown on the &quot;printview&quot;.
<br />
@@ -765,7 +766,7 @@ $cfg['PmaAbsoluteUri'] = (!empty($_SERVER['HTTPS']) ? 'https' : 'http') . '://'
within this database create a table following this scheme:
<br />
<tt>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;CREATE TABLE `PMA_column_comments` (<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;CREATE TABLE `PMA_column_info` (<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;id int(5) unsigned NOT NULL auto_increment,<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;db_name varchar(64) NOT NULL default '',<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;table_name varchar(64) NOT NULL default '',<br />
@@ -778,7 +779,7 @@ $cfg['PmaAbsoluteUri'] = (!empty($_SERVER['HTTPS']) ? 'https' : 'http') . '://'
</li>
<li>
put the table name in
<tt>$cfg['Servers'][$i]['column_comments']</tt>
<tt>$cfg['Servers'][$i]['column_info']</tt>
</li>
</ul><br />
</dd>

View File

@@ -91,9 +91,9 @@ $cfg['Servers'][$i]['table_info'] = ''; // table to describe the dis
$cfg['Servers'][$i]['table_coords'] = ''; // table to describe the tables position for the PDF
// schema - leave blank for no PDF schema support
$cfg['Servers'][$i]['pdf_pages'] = ''; // table to describe pages of relationpdf
// - leave blank if you don't want to use this
$cfg['Servers'][$i]['column_comments'] // table to store columncomments
= ''; // - leave blank if you don't want to use this
// - leave blank if you don't want to use this
$cfg['Servers'][$i]['column_info'] = ''; // table to store column information
// - leave blank if you don't want to use this
$cfg['Servers'][$i]['AllowDeny']['order'] // Host authentication order, leave blank to not use
= '';
$cfg['Servers'][$i]['AllowDeny']['rules'] // Host authentication rules, leave blank for defaults
@@ -119,7 +119,7 @@ $cfg['Servers'][$i]['relation'] = '';
$cfg['Servers'][$i]['table_info'] = '';
$cfg['Servers'][$i]['table_coords'] = '';
$cfg['Servers'][$i]['pdf_pages'] = '';
$cfg['Servers'][$i]['column_comments'] = '';
$cfg['Servers'][$i]['column_info'] = '';
$cfg['Servers'][$i]['AllowDeny']['order']
= '';
$cfg['Servers'][$i]['AllowDeny']['rules']
@@ -144,7 +144,7 @@ $cfg['Servers'][$i]['relation'] = '';
$cfg['Servers'][$i]['table_info'] = '';
$cfg['Servers'][$i]['table_coords'] = '';
$cfg['Servers'][$i]['pdf_pages'] = '';
$cfg['Servers'][$i]['column_comments'] = '';
$cfg['Servers'][$i]['column_info'] = '';
$cfg['Servers'][$i]['AllowDeny']['order']
= '';
$cfg['Servers'][$i]['AllowDeny']['rules']
@@ -179,8 +179,8 @@ $cfg['UseDbSearch'] = TRUE; // whether to enable the "database searc
$cfg['LeftFrameLight'] = TRUE; // use a select-based menu and display only the
// current tables in the 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['ShowTooltipAliasTB'] = FALSE; // are shown (in the left menu and db_details_structure) instead of
$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
// table/db names
$cfg['LeftDisplayLogo'] = TRUE; // display logo at top of left frame
@@ -366,10 +366,10 @@ $cfg['ModifyDeleteAtLeft'] = TRUE; // show edit/delete links on left si
// (or at the top with vertical browse)
$cfg['ModifyDeleteAtRight'] = FALSE; // show edit/delete links on right side of browse
// (or at the bottom with vertical browse)
$cfg['DefaultDisplay'] = 'horizontal'; // default display direction
$cfg['DefaultDisplay'] = 'horizontal'; // default display direction
// (horizontal|vertical|horizontalflipped)
$cfg['HeaderFlipType'] = 'css'; // table-header rotation via faking or css? (css|fake)
$cfg['ShowBrowseComments'] = TRUE; // shows stored relation-comments in 'browse' mode.
$cfg['HeaderFlipType'] = 'css'; // table-header rotation via faking or css? (css|fake)
$cfg['ShowBrowseComments'] = TRUE; // shows stored relation-comments in 'browse' mode.
$cfg['ShowPropertyComments']= TRUE; // shows stored relation-comments in 'table property' mode.
$cfg['RepeatCells'] = 100; // repeat header names every X cells? (0 = deactivate)
@@ -379,7 +379,7 @@ $cfg['QueryFrameJS'] = TRUE; // whether to use JavaScript functio
$cfg['QueryFrameDebug'] = FALSE; // display JS debugging link (DEVELOPERS only)
$cfg['QueryWindowWidth'] = 750; // Width of Query window
$cfg['QueryWindowHeight'] = 300; // Height of Query window
$cfg['BrowseMIME'] = TRUE; // Use MIME-Types (stored in column comments table) for
/**

View File

@@ -48,7 +48,7 @@ if (isset($do) && $do == 'import') {
//echo '<p>' . $line . '</p>';
$inf = explode('|',$line);
if (!empty($inf[1]) && strlen(trim($inf[1])) > 0) {
$qry = 'INSERT INTO ' . PMA_backquote($cfgRelation['column_comments'])
$qry = 'INSERT INTO ' . PMA_backquote($cfgRelation['column_info'])
. ' (db_name, table_name, column_name, ' . PMA_backquote('comment') . ') '
. ' VALUES('
. '\'' . PMA_sqlAddslashes($db) . '\','

View File

@@ -110,13 +110,13 @@ if ($is_select) {
if (isset($analyzed_sql[0]['table_ref'][0]['table_true_name'])) {
$table = $analyzed_sql[0]['table_ref'][0]['table_true_name'];
}
if (isset($analyzed_sql[0]['table_ref'][0]['db'])
if (isset($analyzed_sql[0]['table_ref'][0]['db'])
&& !empty($analyzed_sql[0]['table_ref'][0]['db'])) {
$db = $analyzed_sql[0]['table_ref'][0]['db'];
}
else {
$db = $prev_db;
}
}
$reload = ($db == $prev_db) ? 0 : 1;
}
@@ -124,7 +124,7 @@ if ($is_select) {
* Sets or modifies the $goto variable if required
*/
if ($goto == 'sql.php3') {
$goto = 'sql.php3?'
$goto = 'sql.php3?'
. PMA_generate_common_url($db, $table)
. '&amp;pos=' . $pos
. '&amp;sql_query=' . urlencode($sql_query);
@@ -297,14 +297,14 @@ else {
}
else {
// garvin: Measure query time. TODO-Item http://sourceforge.net/tracker/index.php?func=detail&aid=571934&group_id=23067&atid=377411
list($usec, $sec) = explode(' ',microtime());
$querytime_before = ((float)$usec + (float)$sec);
list($usec, $sec) = explode(' ',microtime());
$querytime_before = ((float)$usec + (float)$sec);
$result = @PMA_mysql_query($full_sql_query);
list($usec, $sec) = explode(' ',microtime());
list($usec, $sec) = explode(' ',microtime());
$querytime_after = ((float)$usec + (float)$sec);
$GLOBALS['querytime'] = $querytime_after - $querytime_before;
// Displays an error message if required and stop parsing the script
@@ -368,7 +368,7 @@ else {
$count_query = 'SELECT SQL_CALC_FOUND_ROWS ';
}
// add the remaining of select expression if there is
// add the remaining of select expression if there is
// a GROUP BY or HAVING clause
if (PMA_MYSQL_INT_VERSION < 40000
&& $count_what =='*'
@@ -382,7 +382,7 @@ else {
$count_query .= $analyzed_sql[0]['select_expr_clause'];
}
if (!empty($analyzed_sql[0]['from_clause'])) {
$count_query .= ' FROM ' . $analyzed_sql[0]['from_clause'];
}
@@ -411,7 +411,7 @@ else {
} else {
if (mysql_error()) {
// there are some cases where the generated
// count_query (for MySQL 3) is wrong,
// count_query (for MySQL 3) is wrong,
// so we get here.
//TODO: use a big unlimited query to get
// the correct number of rows (depending
@@ -423,7 +423,7 @@ else {
mysql_query($count_query);
if (mysql_error()) {
// void. I tried the case
// (SELECT `User`, `Host`, `Db`, `Select_priv` FROM `db`)
// (SELECT `User`, `Host`, `Db`, `Select_priv` FROM `db`)
// UNION (SELECT `User`, `Host`, "%" AS "Db",
// `Select_priv`
// FROM `user`) ORDER BY `User`, `Host`, `Db`;
@@ -442,22 +442,22 @@ else {
if (isset($purge)) {
include('./libraries/relation.lib.php3');
$cfgRelation = PMA_getRelationsParam();
if ($cfgRelation['commwork']) {
if (isset($table) && isset($db) && !empty($table) && !empty($db)) {
$remove_query = 'DELETE FROM ' . PMA_backquote($cfgRelation['column_comments'])
$remove_query = 'DELETE FROM ' . PMA_backquote($cfgRelation['column_info'])
. ' WHERE db_name = \'' . PMA_sqlAddslashes($db) . '\''
. ' AND table_name = \'' . PMA_sqlAddslashes($table) . '\'';
$rmv_rs = PMA_query_as_cu($remove_query);
unset($rmv_query);
} elseif (isset($db) && !empty($db)) {
$remove_query = 'DELETE FROM ' . PMA_backquote($cfgRelation['column_comments'])
$remove_query = 'DELETE FROM ' . PMA_backquote($cfgRelation['column_info'])
. ' WHERE db_name = \'' . PMA_sqlAddslashes($db) . '\'';
$rmv_rs = PMA_query_as_cu($remove_query);
unset($rmv_query);
}
} // end if relation-stuff
} // end if ($purge)
} // end if relation-stuff
} // end if ($purge)
} // end else "didn't ask to see php code"
@@ -595,7 +595,7 @@ else {
// Displays "Insert a new row" link if required
if ($disp_mode[6] == '1') {
$lnk_goto = 'sql.php3?'
$lnk_goto = 'sql.php3?'
. PMA_generate_common_url($db, $table)
. '&amp;pos=' . $pos
. '&amp;session_max_rows=' . $session_max_rows
@@ -654,7 +654,7 @@ else {
&& !empty($sql_query)) {
echo "\n";
$goto = 'sql.php3?'
$goto = 'sql.php3?'
. PMA_generate_common_url($db, $table)
. '&amp;pos=' . $pos
. '&amp;session_max_rows=' . $session_max_rows

View File

@@ -78,7 +78,7 @@ if (isset($new_name) && trim($new_name) != '') {
$parsed_sql = PMA_SQP_parse($sql_structure);
// no need to PMA_backquote()
$parsed_sql[2]['data'] = $target;
$sql_structure = PMA_SQP_formatHtml($parsed_sql, 'query_only');
$sql_structure = PMA_SQP_formatHtml($parsed_sql, 'query_only');
// do not create the table if dataonly
if ($what != 'dataonly') {
@@ -127,9 +127,9 @@ if (isset($new_name) && trim($new_name) != '') {
// garvin: Move old entries from comments to new table
if ($cfgRelation['commwork']) {
$remove_query = 'UPDATE ' . PMA_backquote($cfgRelation['column_comments'])
. ' SET table_name = \'' . PMA_sqlAddslashes($new_name) . '\', '
. ' db_name = \'' . PMA_sqlAddslashes($target_db) . '\''
$remove_query = 'UPDATE ' . PMA_backquote($cfgRelation['column_info'])
. ' SET table_name = \'' . PMA_sqlAddslashes($new_name) . '\', '
. ' db_name = \'' . PMA_sqlAddslashes($target_db) . '\''
. ' WHERE db_name = \'' . PMA_sqlAddslashes($db) . '\''
. ' AND table_name = \'' . PMA_sqlAddslashes($table) . '\'';
$rmv_rs = PMA_query_as_cu($remove_query);
@@ -143,10 +143,10 @@ if (isset($new_name) && trim($new_name) != '') {
// garvin: Create new entries as duplicates from old comments
if ($cfgRelation['commwork']) {
// Get all comments and MIME-Types for current table
$comments_copy_query = 'SELECT
$comments_copy_query = 'SELECT
column_name, ' . PMA_backquote('comment') . '
FROM ' . PMA_backquote($cfgRelation['column_comments']) . '
WHERE
FROM ' . PMA_backquote($cfgRelation['column_info']) . '
WHERE
db_name = \'' . PMA_sqlAddslashes($db) . '\' AND
table_name = \'' . PMA_sqlAddslashes($table) . '\'';
$comments_copy_rs = PMA_query_as_cu($comments_copy_query);

View File

@@ -46,8 +46,8 @@ if (isset($new_name) && trim($new_name) != '') {
include('./libraries/relation.lib.php3');
$cfgRelation = PMA_getRelationsParam();
if ($cfgRelation['commwork']) {
$remove_query = 'UPDATE ' . PMA_backquote($cfgRelation['column_comments'])
. ' SET table_name = \'' . PMA_sqlAddslashes($table) . '\''
$remove_query = 'UPDATE ' . PMA_backquote($cfgRelation['column_info'])
. ' SET table_name = \'' . PMA_sqlAddslashes($table) . '\''
. ' WHERE db_name = \'' . PMA_sqlAddslashes($db) . '\''
. ' AND table_name = \'' . PMA_sqlAddslashes($old_name) . '\'';
$rmv_rs = PMA_query_as_cu($remove_query);