mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-22 16:03:47 +01:00
Add some debug into infolog csv import
This commit is contained in:
parent
f7d195e7de
commit
f24d9c770e
@ -257,7 +257,11 @@ class infolog_import_infologs_csv implements importexport_iface_import_plugin
|
||||
if($record['info_link_id'] && !is_numeric($record['info_link_id']))
|
||||
{
|
||||
// But try to search for it as a contact
|
||||
$record['info_contact'] = $record['info_link_id'];
|
||||
if(!$record['info_contact'])
|
||||
{
|
||||
$record['info_contact'] = $record['info_link_id'];
|
||||
$record['info_des'] .= "\nTried to import text into info_link_id: " . $record['info_link_id'];
|
||||
}
|
||||
unset($record['info_link_id']);
|
||||
}
|
||||
// If contact or from is set and not an ID, find it. Use quotes for exact match.
|
||||
@ -266,12 +270,14 @@ class infolog_import_infologs_csv implements importexport_iface_import_plugin
|
||||
if ($record[$field] && is_string($record[$field]))
|
||||
{
|
||||
$contacts = Link::query('addressbook', '"' . $record[$field] . '"');
|
||||
$record['info_des'] .= "\nImport text into $field: " . $record[$field]."\nMatches:\n".print_r($contacts,true);
|
||||
if ($contacts)
|
||||
{
|
||||
$record['info_contact'] = array(
|
||||
'id' => array_key_first($contacts),
|
||||
'app' => 'addressbook'
|
||||
);
|
||||
$record['info_des'] .= "\ninfo_contact: " .print_r($record['info_contact'],true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user