diff --git a/ChangeLog b/ChangeLog index 84e438388..1092bd5b0 100755 --- a/ChangeLog +++ b/ChangeLog @@ -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 * db_printview.php: fixed bug 'no tables found', refactored diff --git a/libraries/export/latex.php b/libraries/export/latex.php index 1c24723a7..43d029b57 100644 --- a/libraries/export/latex.php +++ b/libraries/export/latex.php @@ -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 = ' '; - if ($binary) { - $strAttribute = 'BINARY'; - } - if ($unsigned) { - $strAttribute = 'UNSIGNED'; - } - if ($zerofill) { - $strAttribute = 'UNSIGNED ZEROFILL'; - } if (!isset($row['Default'])) { if ($row['Null'] != '') { $row['Default'] = 'NULL';