Show database comment on each tab (same as we do with table comments).

This commit is contained in:
Michal Čihař
2005-03-07 15:10:19 +00:00
parent 287af827e5
commit c4cf36a08d
3 changed files with 27 additions and 24 deletions

View File

@@ -13,6 +13,8 @@ $Source$
libraries/header_meta_style.inc.php: Actually use print style in themes,
also fixes RFE #1120880.
* sql.php: Better calculate inserted row id (bug #1156963).
* db_details_links.php, db_details_structure.php: Show database comment on
each tab (same as we do with table comments).
2005-03-06 Michael Keck <mkkeck@users.sourceforge.net>
* themes/*/img/bd_deltbl.png, themes/*/bd_drop.png: Added disabled

View File

@@ -97,6 +97,29 @@ if (!$cfg['LightTabs']) {
echo '<br />';
}
/**
* Settings for relations stuff
*/
require_once('./libraries/relation.lib.php');
$cfgRelation = PMA_getRelationsParam();
// Get additional information about tables for tooltip is done in db_details_db_info.php only once
if ($cfgRelation['commwork']) {
$comment = PMA_getComments($db);
/**
* Displays table comment
*/
if (is_array($comment)) {
?>
<!-- DB comment -->
<p id="dbComment"><i>
<?php echo htmlspecialchars(implode(' ', $comment)) . "\n"; ?>
</i></p>
<?php
} // end if
}
/**
* Displays a message
*/

View File

@@ -81,12 +81,6 @@ function pma_TableHeader($alternate = FALSE, $record_count = TRUE) {
}
/**
* Settings for relations stuff
*/
require_once('./libraries/relation.lib.php');
$cfgRelation = PMA_getRelationsParam();
/**
* Displays the tables list
*/
@@ -151,22 +145,6 @@ if ($num_tables == 0) {
}
// 2. Shows table informations - staybyte - 11 June 2001
else {
// Get additional information about tables for tooltip is done in db_details_db_info.php only once
if ($cfgRelation['commwork']) {
$comment = PMA_getComments($db);
/**
* Displays table comment
*/
if (is_array($comment)) {
?>
<!-- DB comment -->
<p id="dbComment"><i>
<?php echo htmlspecialchars(implode(' ', $comment)) . "\n"; ?>
</i></p>
<?php
} // end if
}
?>
<form method="post" action="db_details_structure.php" name="tablesForm">
<?php echo PMA_generate_common_hidden_inputs($db); ?>
@@ -478,10 +456,10 @@ else {
if ($cfg['ShowStats']) {
?>
<td align="right" bgcolor="<?php echo $bgcolor; ?>">
&nbsp;-&nbsp;
&nbsp;-&nbsp;
</td>
<td align="right" bgcolor="<?php echo $bgcolor; ?>">
&nbsp;-&nbsp;
&nbsp;-&nbsp;
</td>
<?php
}