mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-22 06:30:59 +01:00
If a link match can't be found, do not clear the field but leave it so the plugin can try
This commit is contained in:
parent
89b4ce31e8
commit
88d1c1eefa
@ -320,7 +320,7 @@ class importexport_import_csv implements importexport_iface_import_record { //,
|
||||
if(!is_numeric($record[$name]))
|
||||
{
|
||||
$results = egw_link::query($links[$name], $record[$name]);
|
||||
if(count($results) > 1)
|
||||
if(count($results) >= 1)
|
||||
{
|
||||
// More than 1 result. Check for exact match
|
||||
$exact_count = 0;
|
||||
@ -340,12 +340,12 @@ class importexport_import_csv implements importexport_iface_import_record { //,
|
||||
$warnings[] = lang('Unable to link to %1 "%2"',
|
||||
lang($links[$name]), $record[$name]).
|
||||
' - ' .lang('too many matches');
|
||||
$record[$name] = null;
|
||||
continue;
|
||||
}
|
||||
elseif ($exact_count == 1)
|
||||
{
|
||||
$record[$name] = $app_id;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
if (count($results) == 0)
|
||||
@ -353,7 +353,6 @@ class importexport_import_csv implements importexport_iface_import_record { //,
|
||||
$warnings[] = lang('Unable to link to %1 "%2"',
|
||||
lang($links[$name]), $record[$name]).
|
||||
' - ' . lang('no matches');
|
||||
$record[$name] = null;
|
||||
continue;
|
||||
} else {
|
||||
$record[$name] = key($results);
|
||||
|
Loading…
Reference in New Issue
Block a user