From c96042f9e1af66fb51cd5b8ab9fa91d3439b8ee3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Wed, 14 Apr 2004 13:48:41 +0000 Subject: [PATCH] Do not strip export too much (bug #913988). --- ChangeLog | 1 + libraries/export/csv.php | 3 +-- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index f936f988e..a0fc4b290 100755 --- a/ChangeLog +++ b/ChangeLog @@ -16,6 +16,7 @@ $Source$ libraries/config_import.lib.php, libraries/display_export.lib.php, libraries/export/*: Support for enclosing SQL export in transaction (RFE #930827). + * libraries/export/csv.php: Do not strip export too much (bug #913988). 2004-04-13 Marc Delisle * libraries/relation.lib.php: bug 930445 when PMA_table_info not defined, diff --git a/libraries/export/csv.php b/libraries/export/csv.php index cfbc1b36a..5b3fdd590 100644 --- a/libraries/export/csv.php +++ b/libraries/export/csv.php @@ -148,11 +148,10 @@ function PMA_exportData($db, $table, $crlf, $error_url, $sql_query) { while ($row = PMA_DBI_fetch_row($result)) { $schema_insert = ''; for ($j = 0; $j < $fields_cnt; $j++) { - if (!isset($row[$j])) { + if (!isset($row[$j]) || is_null($row[$j])) { $schema_insert .= $GLOBALS[$what . '_replace_null']; } else if ($row[$j] == '0' || $row[$j] != '') { - $row[$j] = stripslashes($row[$j]); // loic1 : always enclose fields if ($what == 'excel') { $row[$j] = ereg_replace("\015(\012)?", "\012", $row[$j]);