mirror of
https://github.com/Combodo/iTop.git
synced 2026-05-19 23:32:17 +02:00
CSV import (both std and related to the data synchro) can be used with a tab (keyword 'tab', case insensitive)
SVN:1.2[1746]
This commit is contained in:
@@ -104,7 +104,7 @@ $aPageParams = array
|
|||||||
'mandatory' => false,
|
'mandatory' => false,
|
||||||
'modes' => 'http,cli',
|
'modes' => 'http,cli',
|
||||||
'default' => ';',
|
'default' => ';',
|
||||||
'description' => 'column separator in CSV data',
|
'description' => 'column separator in CSV data (1 char, or \'tab\')',
|
||||||
),
|
),
|
||||||
'qualifier' => array
|
'qualifier' => array
|
||||||
(
|
(
|
||||||
@@ -309,6 +309,11 @@ try
|
|||||||
$sComment = ReadParam($oP, 'comment', 'raw_data');
|
$sComment = ReadParam($oP, 'comment', 'raw_data');
|
||||||
$sNoStopOnImportError = ReadParam($oP, 'no_stop_on_import_error');
|
$sNoStopOnImportError = ReadParam($oP, 'no_stop_on_import_error');
|
||||||
|
|
||||||
|
if (strtolower(trim($sSep)) == 'tab')
|
||||||
|
{
|
||||||
|
$sSep = "\t";
|
||||||
|
}
|
||||||
|
|
||||||
$oLoadStartDate = new DateTime(); // Now
|
$oLoadStartDate = new DateTime(); // Now
|
||||||
|
|
||||||
// Note about date formatting: These MySQL settings are read-only... and in fact unused :-(
|
// Note about date formatting: These MySQL settings are read-only... and in fact unused :-(
|
||||||
|
|||||||
@@ -102,7 +102,7 @@ $aPageParams = array
|
|||||||
'mandatory' => false,
|
'mandatory' => false,
|
||||||
'modes' => 'http,cli',
|
'modes' => 'http,cli',
|
||||||
'default' => ',',
|
'default' => ',',
|
||||||
'description' => 'column separator in CSV data',
|
'description' => 'column separator in CSV data (1 char, or \'tab\')',
|
||||||
),
|
),
|
||||||
'qualifier' => array
|
'qualifier' => array
|
||||||
(
|
(
|
||||||
@@ -283,6 +283,11 @@ try
|
|||||||
$sSimulate = ReadParam($oP, 'simulate');
|
$sSimulate = ReadParam($oP, 'simulate');
|
||||||
$sComment = ReadParam($oP, 'comment', 'raw_data');
|
$sComment = ReadParam($oP, 'comment', 'raw_data');
|
||||||
|
|
||||||
|
if (strtolower(trim($sSep)) == 'tab')
|
||||||
|
{
|
||||||
|
$sSep = "\t";
|
||||||
|
}
|
||||||
|
|
||||||
//////////////////////////////////////////////////
|
//////////////////////////////////////////////////
|
||||||
//
|
//
|
||||||
// Check parameters format/consistency
|
// Check parameters format/consistency
|
||||||
|
|||||||
Reference in New Issue
Block a user