forked from Wavyzz/dolibarr
Work on import module
This commit is contained in:
@@ -68,7 +68,7 @@ class ImportCsv extends ModeleImports
|
||||
$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;
|
||||
if (! empty($conf->global->IMPORT_CSV_SEPARATOR_TO_USE)) $this->separator=$conf->global->IMPORT_CSV_SEPARATOR_TO_USE;
|
||||
}
|
||||
|
||||
function getDriverId()
|
||||
@@ -102,6 +102,48 @@ class ImportCsv extends ModeleImports
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* \brief Output header of an example file for this format
|
||||
* \param langs Output language
|
||||
*/
|
||||
function write_header_example($outputlangs)
|
||||
{
|
||||
return '';
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Output title line of an example file for this format
|
||||
* \param langs Output language
|
||||
*/
|
||||
function write_title_example($outputlangs,$headerlinefields)
|
||||
{
|
||||
$s='';
|
||||
$s.=join($this->separator,$headerlinefields);
|
||||
return $s."\n";
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Output record of an example file for this format
|
||||
* \param langs Output language
|
||||
*/
|
||||
function write_record_example($outputlangs,$contentlinevalues)
|
||||
{
|
||||
$s='';
|
||||
$s.=join($this->separator,$contentlinevalues);
|
||||
return $s."\n";
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Output footer of an example file for this format
|
||||
* \param langs Output language
|
||||
*/
|
||||
function write_footer_example($outputlangs)
|
||||
{
|
||||
return '';
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* \brief Open output file
|
||||
* \param file Path of filename
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?php
|
||||
/* Copyright (C) 2005 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
/* Copyright (C) 2005-2009 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2007 Regis Houssin <regis@dolibarr.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
@@ -24,7 +24,6 @@
|
||||
* \brief File of parent class for import file readers
|
||||
* \version $Id$
|
||||
*/
|
||||
|
||||
require_once(DOL_DOCUMENT_ROOT.'/lib/functions.lib.php');
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user