mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-24 02:58:43 +02:00
#777 mandatory fields that are external keys are now displayed with a star before the arrow: ExtkeyName*->ReconciliationField. In import the old syntax is supported as well.
SVN:trunk[2908]
This commit is contained in:
@@ -463,6 +463,12 @@ try
|
||||
// Ignore any trailing "star" (*) that simply indicates a mandatory field
|
||||
$sFieldName = $aMatches[1];
|
||||
}
|
||||
else if (preg_match('/^(.+)\*->(.+)$/', $sFieldName, $aMatches))
|
||||
{
|
||||
// Remove any trailing "star" character before the arrow (->)
|
||||
// A star character at the end can be used to indicate a mandatory field
|
||||
$sFieldName = $aMatches[1].'->'.$aMatches[2];
|
||||
}
|
||||
if (array_key_exists(strtolower($sFieldName), $aKnownColumnNames))
|
||||
{
|
||||
$aColumns = $aKnownColumnNames[strtolower($sFieldName)];
|
||||
@@ -481,7 +487,7 @@ try
|
||||
{
|
||||
// Protect against XSS injection
|
||||
$sSafeName = str_replace(array('"', '<', '>'), '', $sFieldName);
|
||||
throw new BulkLoadException("Unknown column: '$sSafeName'");
|
||||
throw new BulkLoadException("Unknown column: '$sSafeName'. Possible columns: ".implode(', ', array_keys($aKnownColumnNames)));
|
||||
}
|
||||
}
|
||||
// Note: at this stage the list of fields is supposed to be made of attcodes (and the symbol '->')
|
||||
|
||||
Reference in New Issue
Block a user