diff --git a/ChangeLog b/ChangeLog index 17cb27040..7360a61cb 100755 --- a/ChangeLog +++ b/ChangeLog @@ -15,6 +15,8 @@ $Source$ libraries/sqlparser.lib.php, libraries/string.lib.php, libraries/transformations/text_plain__substr.inc.php: Use charset aware substr and strlen functions (bugs #854755 and #910575). + * export.php: Fix buffer length counting, fix error detection. + * libraries/export/latex.php: Fix undefined variable warning. 2004-03-05 Marc Delisle * libraries/sqlparser.lib.php: bug 909752, floating point digit diff --git a/export.php b/export.php index 69e4eb843..0db440584 100644 --- a/export.php +++ b/export.php @@ -65,7 +65,7 @@ function PMA_exportOutputHandler($line) $dump_buffer .= $line; if ($GLOBALS['onfly_compression']) { - $dump_buffer_len += strlen($dump_buffer); + $dump_buffer_len += strlen($line); if ($dump_buffer_len > $GLOBALS['memory_limit']) { // as bzipped @@ -82,7 +82,7 @@ function PMA_exportOutputHandler($line) } if ($GLOBALS['save_on_server']) { $write_result = @fwrite($GLOBALS['file_handle'], $dump_buffer); - if (!$write_result || ($write_result != strlen($line))) { + if (!$write_result || ($write_result != strlen($dump_buffer))) { $GLOBALS['message'] = sprintf($GLOBALS['strNoSpace'], htmlspecialchars($save_filename)); return FALSE; } diff --git a/libraries/export/latex.php b/libraries/export/latex.php index a0a3d8f80..1f55aae8a 100644 --- a/libraries/export/latex.php +++ b/libraries/export/latex.php @@ -266,7 +266,7 @@ function PMA_exportStructure($db, $table, $crlf, $error_url, $do_relation = fals } $buffer = $alignment . '} ' . $crlf ; - $header .= ' \\hline '; + $header = ' \\hline '; $header .= '\\multicolumn{1}{|c|}{\\textbf{' . $GLOBALS['strField'] . '}} & \\multicolumn{1}{|c|}{\\textbf{' . $GLOBALS['strType'] . '}} & \\multicolumn{1}{|c|}{\\textbf{' . $GLOBALS['strNull'] . '}} & \\multicolumn{1}{|c|}{\\textbf{' . $GLOBALS['strDefault'] . '}}'; if ($do_relation && $have_rel) { $header .= ' & \\multicolumn{1}{|c|}{\\textbf{' . $GLOBALS['strLinksTo'] . '}}';