mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-24 11:08:45 +02:00
Trac #86 - CSV format aligned with standard specifications
Trac #93 - Fixed issue within the setup data load (related to memory_limit) Fixed issues with the consultant toolkit: upgrade an existing DB (add new class/attribute) Developed core services to allow for demonstrating impact computation capability Deprecated option operation=direct on page UI.php SVN:trunk[313]
This commit is contained in:
@@ -18,6 +18,7 @@
|
||||
// - only external fields attributes could be used as reconciliation keys for external keys
|
||||
// - reconciliation is made on the first column
|
||||
// - no option to force 'always create' or 'never create'
|
||||
// - text qualifier hardcoded to "
|
||||
//
|
||||
// Known issues
|
||||
// - ALMOST impossible to troubleshoot when an externl key has a wrong value
|
||||
@@ -58,11 +59,9 @@ try
|
||||
$sSep = utils::ReadParam('separator', ';');
|
||||
$sCSVData = utils::ReadPostedParam('csvdata');
|
||||
|
||||
$oCSVParser = new CSVParser($sCSVData);
|
||||
$oCSVParser->SetSeparator($sSep);
|
||||
$oCSVParser->SetSkipLines(1);
|
||||
$oCSVParser = new CSVParser($sCSVData, $sSep, $sDelimiter = '"');
|
||||
|
||||
// Limitation: as the attribute list is in the first line, we can not match external key by an third-party attribute
|
||||
// Limitation: as the attribute list is in the first line, we can not match external key by a third-party attribute
|
||||
$sRawFieldList = $oCSVParser->ListFields();
|
||||
$aAttList = array();
|
||||
$aExtKeys = array();
|
||||
@@ -93,9 +92,6 @@ try
|
||||
// Limitation: the reconciliation key is the first attribute
|
||||
$aReconcilKeys = array($sRawFieldList[0]);
|
||||
|
||||
// print_r($oCSVParser->ListFields());
|
||||
// print_r($oCSVParser->ToArray($oCSVParser->ListFields()));
|
||||
|
||||
$aData = $oCSVParser->ToArray();
|
||||
$oBulk = new BulkChange(
|
||||
$sClass,
|
||||
|
||||
Reference in New Issue
Block a user