diff --git a/ChangeLog b/ChangeLog index 2a245211c..8a2bead10 100755 --- a/ChangeLog +++ b/ChangeLog @@ -6,6 +6,8 @@ $Id$ $Source$ 2003-03-12 Garvin Hicking + * db_printview.php3, tbl_printview.php3, db_datadict.php3, pdf_schema.php3: + Display DB comments and MIME types, where appropriate. * header.inc.php3, querywindow.php3, libraries/common.lib.php3: Fixed some bugs for the querywindow which didn't show the latest querys always. * Documentation.html, db_details.php3, read_dump.php3, tbl_query_box.php3: diff --git a/db_datadict.php3 b/db_datadict.php3 index 41a56b8d7..2c453fe44 100644 --- a/db_datadict.php3 +++ b/db_datadict.php3 @@ -15,6 +15,9 @@ if (!isset($selected_tbl)) { * Gets the relations settings */ require('./libraries/relation.lib.php3'); +require('./libraries/transformations.lib.php3'); + +$cfgRelation = PMA_getRelationsParam(); /** @@ -26,6 +29,21 @@ if (isset($table)) { $err_url = 'db_details.php3?' . PMA_generate_common_url($db); } +if ($cfgRelation['commwork']) { + $comment = PMA_getComments($db); + + /** + * Displays DB comment + */ + if (is_array($comment)) { + ?> + +

+ +

+ ' . $strComments . '' . "\n"; } + if ($cfgRelation['mimework']) { + echo ' MIME' . "\n"; + } ?> @@ -254,6 +274,15 @@ while ($row = mysql_fetch_array($rowset)) { } echo ' ' . "\n"; } + if ($cfgRelation['mimework']) { + $mime_map = PMA_getMIME($db, $table, true); + + echo ' '; + if (isset($mime_map[$field_name])) { + echo htmlspecialchars(str_replace('_', '/', $mime_map[$field_name]['mimetype'])); + } + echo ' ' . "\n"; + } ?> + +

+ +

+ = 32303) { } echo "\n"; ?> + = 32303) { } echo "\n"; ?> + + + = 32303) { } echo "\n"; ?> +   Cell(20,8,ucfirst($GLOBALS['strDefault']),1,0,'C'); $pdf->Cell(25,8,ucfirst($GLOBALS['strExtra']),1,0,'C'); $pdf->Cell(45,8,ucfirst($GLOBALS['strLinksTo']),1,0,'C'); - $pdf->Cell(112,8,ucfirst($GLOBALS['strComments']),1,1,'C'); - $pdf->SetWidths(array(25,20,20,10,20,25,45,112)); + $pdf->Cell(67,8,ucfirst($GLOBALS['strComments']),1,0,'C'); + $pdf->Cell(45,8,'MIME',1,1,'C'); + $pdf->SetWidths(array(25,20,20,10,20,25,45,67,45)); } else { $pdf->Cell(20,8,ucfirst($GLOBALS['strField']),1,0,'C'); $pdf->Cell(20,8,ucfirst($GLOBALS['strType']),1,0,'C'); @@ -1374,8 +1379,9 @@ function PMA_RT_DOC($alltables ){ $pdf->Cell(15,8,ucfirst($GLOBALS['strDefault']),1,0,'C'); $pdf->Cell(15,8,ucfirst($GLOBALS['strExtra']),1,0,'C'); $pdf->Cell(30,8,ucfirst($GLOBALS['strLinksTo']),1,0,'C'); - $pdf->Cell(60,8,ucfirst($GLOBALS['strComments']),1,1,'C'); - $pdf->SetWidths(array(20,20,20,10,15,15,30,60)); + $pdf->Cell(30,8,ucfirst($GLOBALS['strComments']),1,0,'C'); + $pdf->Cell(30,8,'MIME',1,1,'C'); + $pdf->SetWidths(array(20,20,20,10,15,15,30,30,30)); } $pdf->SetFont('', ''); @@ -1434,7 +1440,8 @@ function PMA_RT_DOC($alltables ){ ((isset($row['Default'])) ? $row['Default'] : ''), $row['Extra'] , ((isset($res_rel[$field_name])) ? $res_rel[$field_name]['foreign_table'] . ' -> ' . $res_rel[$field_name]['foreign_field'] : ''), - ((isset($comments[$field_name])) ? $comments[$field_name] : '' ) + ((isset($comments[$field_name])) ? $comments[$field_name] : '' ), + ((isset($mime_map) && isset($mime_map[$field_name])) ? str_replace('_', '/', $mime_map[$field_name]['mimetype']) : '' ) ); $links[0] = $pdf->PMA_links['RT'][$table][$field_name]; if (isset($res_rel[$field_name]['foreign_table']) AND diff --git a/tbl_printview.php3 b/tbl_printview.php3 index c2a27a4bb..ebb72e141 100755 --- a/tbl_printview.php3 +++ b/tbl_printview.php3 @@ -15,6 +15,8 @@ if (!isset($selected_tbl)) { * Gets the relations settings */ require('./libraries/relation.lib.php3'); +require('./libraries/transformations.lib.php3'); + $cfgRelation = PMA_getRelationsParam(); @@ -188,6 +190,9 @@ while (list($key, $table) = each($the_tables)) { if ($cfgRelation['commwork']) { echo ' ' . $strComments . '' . "\n"; } + if ($cfgRelation['mimework']) { + echo ' MIME' . "\n"; + } ?> @@ -273,6 +278,15 @@ while (list($key, $table) = each($the_tables)) { } echo ' ' . "\n"; } + if ($cfgRelation['mimework']) { + $mime_map = PMA_getMIME($db, $table, true); + + echo ' '; + if (isset($mime_map[$field_name])) { + echo htmlspecialchars(str_replace('_', '/', $mime_map[$field_name]['mimetype'])); + } + echo ' ' . "\n"; + } ?>