The branch, master has been updated via 82aa0b7dc1ea3294b2cba2ac84f39143e5b36481 (commit) from f5ffad3583fd436381b3ced82b8aa1d4ae75f2a0 (commit)
- Log ----------------------------------------------------------------- commit 82aa0b7dc1ea3294b2cba2ac84f39143e5b36481 Author: Yuichiro yuichiro@pop07.odn.ne.jp Date: Sun Jan 22 04:09:29 2012 -0500
patch #3472899 [export] Fixed CSV escape for the export
-----------------------------------------------------------------------
Summary of changes: ChangeLog | 1 + libraries/config.default.php | 2 +- libraries/export/csv.php | 5 ++--- 3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/ChangeLog b/ChangeLog index 95f4a2e..898e6b4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -68,6 +68,7 @@ phpMyAdmin - ChangeLog - bug #3340842 [structure] Error dropping index of non-existing column - bug #3093145 [display] Page through rows returned from a view + patch #3303195 [interface] Checkbox to have SQL input remain +- patch #3472899 [export] Fixed CSV escape for the export
3.4.10.0 (not yet released) - bug #3460090 [interface] TextareaAutoSelect feature broken diff --git a/libraries/config.default.php b/libraries/config.default.php index eb177bb..83387c9 100644 --- a/libraries/config.default.php +++ b/libraries/config.default.php @@ -1458,7 +1458,7 @@ $cfg['Export']['csv_enclosed'] = '"'; * * @global string $cfg['Export']['csv_escaped'] */ -$cfg['Export']['csv_escaped'] = '\'; +$cfg['Export']['csv_escaped'] = '"';
/** * diff --git a/libraries/export/csv.php b/libraries/export/csv.php index 15eb09f..bb4a550 100644 --- a/libraries/export/csv.php +++ b/libraries/export/csv.php @@ -190,13 +190,12 @@ if (isset($plugin_list)) { $schema_insert .= $row[$j]; } else { // also double the escape string if found in the data - if ('csv' == $what) { + if ($csv_escaped != $csv_enclosed) { $schema_insert .= $csv_enclosed . str_replace($csv_enclosed, $csv_escaped . $csv_enclosed, str_replace($csv_escaped, $csv_escaped . $csv_escaped, $row[$j])) . $csv_enclosed; } else { - // for excel, avoid a problem when a field contains - // double quotes + // avoid a problem when escape string equals enclose $schema_insert .= $csv_enclosed . str_replace($csv_enclosed, $csv_escaped . $csv_enclosed, $row[$j]) . $csv_enclosed;
hooks/post-receive