minor export fixes

This commit is contained in:
Michal Čihař
2004-03-09 15:27:34 +00:00
parent 4bc0f3cb14
commit 382283de19
3 changed files with 5 additions and 3 deletions

View File

@@ -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 <lem9@users.sourceforge.net>
* libraries/sqlparser.lib.php: bug 909752, floating point digit

View File

@@ -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;
}

View File

@@ -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'] . '}}';