Fix including column names.

This commit is contained in:
Michal Čihař
2006-04-28 08:51:35 +00:00
parent 5ec84ee7f8
commit 02ff4b83d3
2 changed files with 4 additions and 13 deletions

View File

@@ -11,6 +11,7 @@ $Source$
* Documentation.html, main.php, libraries/left_header.inc.php:
Customizable link under left logo (RFE #1111599).
* libraries/export/htmlword.php: Fix including column names.
* libraries/export/latex.php: Add missing crlf, remove unused code.
2006-04-27 Sebastian Mendel <cybot_tm@users.sourceforge.net>
* db_printview.php: fixed bug 'no tables found', refactored

View File

@@ -34,7 +34,7 @@ if (isset($plugin_list)) {
$plugin_list['latex']['options'][] =
array('type' => 'bool', 'name' => 'relation', 'text' => 'strRelations');
}
if (!empty($GLOBALS['cfgRelation']['commwork']) && PMA_MYSQL_INT_VERSION < 40100) {
if (!empty($GLOBALS['cfgRelation']['commwork']) || PMA_MYSQL_INT_VERSION >= 40100) {
$plugin_list['latex']['options'][] =
array('type' => 'bool', 'name' => 'comments', 'text' => 'strComments');
}
@@ -339,7 +339,7 @@ function PMA_exportStructure($db, $table, $crlf, $error_url, $do_relation = fals
$columns_cnt++;
$alignment .= 'l|';
}
if ($do_comments && $cfgRelation['commwork']) {
if ($do_comments && ($cfgRelation['commwork'] || PMA_MYSQL_INT_VERSION >= 40100)) {
$columns_cnt++;
$alignment .= 'l|';
}
@@ -377,7 +377,7 @@ function PMA_exportStructure($db, $table, $crlf, $error_url, $do_relation = fals
$buffer .= ' \\caption{'. str_replace('__TABLE__', PMA_texEscape($table), $GLOBALS['latex_structure_continued_caption'])
. '} \\\\ ' . $crlf;
}
$buffer .= $header . ' \\\\ \\hline \\hline \\endhead \\endfoot ';
$buffer .= $header . ' \\\\ \\hline \\hline \\endhead \\endfoot ' . $crlf;
if (!PMA_exportOutputHandler($buffer)) {
return FALSE;
@@ -409,16 +409,6 @@ function PMA_exportStructure($db, $table, $crlf, $error_url, $do_relation = fals
$unsigned = eregi('UNSIGNED', $row['Type']);
$zerofill = eregi('ZEROFILL', $row['Type']);
}
$strAttribute = '&nbsp;';
if ($binary) {
$strAttribute = 'BINARY';
}
if ($unsigned) {
$strAttribute = 'UNSIGNED';
}
if ($zerofill) {
$strAttribute = 'UNSIGNED ZEROFILL';
}
if (!isset($row['Default'])) {
if ($row['Null'] != '') {
$row['Default'] = 'NULL';