CSV import (both std and related to the data synchro) can be used with a tab (keyword 'tab', case insensitive)

SVN:trunk[1737]
This commit is contained in:
Romain Quetiez
2011-12-21 12:51:08 +00:00
parent ea2843f04e
commit e07912af34
2 changed files with 12 additions and 2 deletions

View File

@@ -104,7 +104,7 @@ $aPageParams = array
'mandatory' => false,
'modes' => 'http,cli',
'default' => ';',
'description' => 'column separator in CSV data',
'description' => 'column separator in CSV data (1 char, or \'tab\')',
),
'qualifier' => array
(
@@ -317,6 +317,11 @@ try
$sComment = ReadParam($oP, 'comment', 'raw_data');
$sNoStopOnImportError = ReadParam($oP, 'no_stop_on_import_error');
if (strtolower(trim($sSep)) == 'tab')
{
$sSep = "\t";
}
$oLoadStartDate = new DateTime(); // Now
// Note about date formatting: These MySQL settings are read-only... and in fact unused :-(

View File

@@ -102,7 +102,7 @@ $aPageParams = array
'mandatory' => false,
'modes' => 'http,cli',
'default' => ',',
'description' => 'column separator in CSV data',
'description' => 'column separator in CSV data (1 char, or \'tab\')',
),
'qualifier' => array
(
@@ -283,6 +283,11 @@ try
$sSimulate = ReadParam($oP, 'simulate');
$sComment = ReadParam($oP, 'comment', 'raw_data');
if (strtolower(trim($sSep)) == 'tab')
{
$sSep = "\t";
}
//////////////////////////////////////////////////
//
// Check parameters format/consistency