mirror of
https://github.com/Combodo/iTop.git
synced 2026-02-13 07:24:13 +01:00
N°8291 - CSV import - column name not automatically recognized in import when name ending by a space
This commit is contained in:
@@ -147,7 +147,7 @@ function GetMappingForField($sClassName, $sFieldName, $iFieldIndex, $bAdvancedMo
|
||||
// When not in advanced mode do not allow to use reconciliation keys (on external keys) if they are themselves external keys !
|
||||
$aChoices[$sAttCode.'->'.$sTargetAttCode] = MetaModel::GetLabel($sClassName, $sAttCode.'->'.$sTargetAttCode, true);
|
||||
foreach ($aSignatures as $sSignature) {
|
||||
if (strcasecmp($sFieldName, $sSignature) == 0) {
|
||||
if (strcasecmp(trim($sFieldName), trim($sSignature)) == 0) {
|
||||
$sFieldCode = $sAttCode.'->'.$sTargetAttCode;
|
||||
}
|
||||
}
|
||||
@@ -160,7 +160,7 @@ function GetMappingForField($sClassName, $sFieldName, $iFieldIndex, $bAdvancedMo
|
||||
|| ($oAttDef instanceof AttributeFriendlyName)
|
||||
) {
|
||||
$aChoices[$sAttCode] = MetaModel::GetLabel($sClassName, $sAttCode, true);
|
||||
if (($sFieldName == $oAttDef->GetLabel()) || ($sFieldName == $sAttCode)) {
|
||||
if (strcasecmp(trim($sFieldName), trim($oAttDef->GetLabel())) == 0 || (trim($sFieldName) == $sAttCode)) {
|
||||
$sFieldCode = $sAttCode;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user