mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-22 01:58:47 +02:00
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:
@@ -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 :-(
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user