From c1587077187001f8516a9eb7dfca3b74b16081e6 Mon Sep 17 00:00:00 2001 From: nathangray Date: Fri, 4 Dec 2020 10:20:34 -0700 Subject: [PATCH] Add some debug into infolog csv import --- infolog/inc/class.infolog_import_infologs_csv.inc.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/infolog/inc/class.infolog_import_infologs_csv.inc.php b/infolog/inc/class.infolog_import_infologs_csv.inc.php index 8d35078517..fa2fa41ef2 100644 --- a/infolog/inc/class.infolog_import_infologs_csv.inc.php +++ b/infolog/inc/class.infolog_import_infologs_csv.inc.php @@ -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); } } }