Fix: Import example file was wrong
This commit is contained in:
parent
8fe14361c3
commit
777c1ff575
@ -62,7 +62,7 @@ class ImportCsv extends ModeleImports
|
||||
global $conf,$langs;
|
||||
$this->db = $db;
|
||||
|
||||
$this->separator=',';
|
||||
$this->separator=','; // Change also function cleansep
|
||||
if (! empty($conf->global->IMPORT_CSV_SEPARATOR_TO_USE)) $this->separator=$conf->global->IMPORT_CSV_SEPARATOR_TO_USE;
|
||||
$this->enclosure='"';
|
||||
$this->escape='"';
|
||||
@ -131,10 +131,7 @@ class ImportCsv extends ModeleImports
|
||||
*/
|
||||
function write_title_example($outputlangs,$headerlinefields)
|
||||
{
|
||||
$func = function($value) {
|
||||
return str_replace($this->separator,'/',$value);
|
||||
};
|
||||
$s.=join($this->separator,array_map($headerlinefields));
|
||||
$s.=join($this->separator,array_map('cleansep',$headerlinefields));
|
||||
return $s."\n";
|
||||
}
|
||||
|
||||
@ -144,10 +141,7 @@ class ImportCsv extends ModeleImports
|
||||
*/
|
||||
function write_record_example($outputlangs,$contentlinevalues)
|
||||
{
|
||||
$func = function($value) {
|
||||
return str_replace($this->separator,'/',$value);
|
||||
};
|
||||
$s=join($this->separator,array_map($contentlinevalues));
|
||||
$s=join($this->separator,array_map('cleansep',$contentlinevalues));
|
||||
return $s."\n";
|
||||
}
|
||||
|
||||
@ -466,4 +460,12 @@ class ImportCsv extends ModeleImports
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Clean a string from separator
|
||||
*/
|
||||
function cleansep($value)
|
||||
{
|
||||
return str_replace(',','/',$value);
|
||||
};
|
||||
|
||||
?>
|
||||
|
||||
@ -289,8 +289,9 @@ ExportCardToFormat=Export card to format
|
||||
ContactNotLinkedToCompany=Contact not linked to any third party
|
||||
DolibarrLogin=Dolibarr login
|
||||
NoDolibarrAccess=No Dolibarr access
|
||||
ExportDataset_company_1=Companies/foundations and properties
|
||||
ExportDataset_company_1=Third parties (Companies/foundations) and properties
|
||||
ExportDataset_company_2=Contacts and properties
|
||||
ImportDataset_company_1=Third parties (Companies/foundations) and properties
|
||||
PriceLevel=Price level
|
||||
DeliveriesAddress=Delivery addresses
|
||||
DeliveryAddress=Delivery address
|
||||
|
||||
Loading…
Reference in New Issue
Block a user