From 25161d3fc4898bc5dc492acb2b7f735a8b238963 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 27 Sep 2009 21:28:52 +0000 Subject: [PATCH] Show separator char used in CSV module --- htdocs/includes/modules/export/export_csv.modules.php | 9 ++++++--- htdocs/includes/modules/import/import_csv.modules.php | 10 ++++++---- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/htdocs/includes/modules/export/export_csv.modules.php b/htdocs/includes/modules/export/export_csv.modules.php index 7af2debfeed..9bf90418d6d 100644 --- a/htdocs/includes/modules/export/export_csv.modules.php +++ b/htdocs/includes/modules/export/export_csv.modules.php @@ -56,8 +56,13 @@ class ExportCsv extends ModeleExports global $conf; $this->db = $db; + $this->separator=','; + if (! empty($conf->global->EXPORT_CSV_SEPARATOR_TO_USE)) $this->separator=$conf->global->EXPORT_CSV_SEPARATOR_TO_USE; + $this->escape="\\"; + $this->string='"'; + $this->id='csv'; // Same value then xxx in file name export_xxx.modules.php - $this->label='Csv (Comma Separated Value)'; // Label of driver + $this->label='Csv (Comma Separated Value, separator="'.$this->separator.'")'; // Label of driver $this->extension='csv'; // Extension for generated file by this driver $this->picto='mime/other'; // Picto $ver=split(' ','$Revision$'); @@ -67,8 +72,6 @@ class ExportCsv extends ModeleExports $this->label_lib='Dolibarr'; $this->version_lib=DOL_VERSION; - $this->separator=','; - if (! empty($conf->global->EXPORT_CSV_SEPARATOR_TO_USE)) $this->separator=$conf->global->EXPORT_CSV_SEPARATOR_TO_USE; } function getDriverId() diff --git a/htdocs/includes/modules/import/import_csv.modules.php b/htdocs/includes/modules/import/import_csv.modules.php index 3c7a76277a1..264b54ff493 100644 --- a/htdocs/includes/modules/import/import_csv.modules.php +++ b/htdocs/includes/modules/import/import_csv.modules.php @@ -56,8 +56,13 @@ class ImportCsv extends ModeleImports global $conf; $this->db = $db; + $this->separator=','; + if (! empty($conf->global->EXPORT_CSV_SEPARATOR_TO_USE)) $this->separator=$conf->global->EXPORT_CSV_SEPARATOR_TO_USE; + $this->escape="\\"; + $this->string='"'; + $this->id='csv'; // Same value then xxx in file name export_xxx.modules.php - $this->label='Csv (Comma Separated Value)'; // Label of driver + $this->label='Csv (Comma Separated Value, separator="'.$this->separator.'")'; // Label of driver $this->extension='csv'; // Extension for generated file by this driver $this->picto='mime/other'; // Picto $ver=split(' ','$Revision$'); @@ -66,9 +71,6 @@ class ImportCsv extends ModeleImports // If driver use an external library, put its name here $this->label_lib='Dolibarr'; $this->version_lib=DOL_VERSION; - - $this->separator=','; - if (! empty($conf->global->IMPORT_CSV_SEPARATOR_TO_USE)) $this->separator=$conf->global->IMPORT_CSV_SEPARATOR_TO_USE; } function getDriverId()