From b078152a10d3c174b10a52081c1a5e1f22a6a0be Mon Sep 17 00:00:00 2001 From: nathan Date: Wed, 16 Aug 2023 14:56:16 -0600 Subject: [PATCH] Infolog: Stop creating links to accounts for mail -> infolog --- infolog/inc/class.infolog_bo.inc.php | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/infolog/inc/class.infolog_bo.inc.php b/infolog/inc/class.infolog_bo.inc.php index bccfaf8f30..d3108d11cb 100644 --- a/infolog/inc/class.infolog_bo.inc.php +++ b/infolog/inc/class.infolog_bo.inc.php @@ -1432,7 +1432,9 @@ class infolog_bo array( 'email' => $mailadr, 'email_home' => $mailadr - ),True,'','','',false,'OR',false,null,'',false)); + ), ['id', 'account_id'], '', '', '', false, 'OR', false, null, '', false + ) + ); } if (!$contacts || !is_array($contacts) || !is_array($contacts[0])) { @@ -1444,10 +1446,13 @@ class infolog_bo // create the first address as info_contact $contact = array_shift($contacts); $info['info_contact'] = 'addressbook:'.$contact['id']; - // create the rest a "ordinary" links + // create the rest as "ordinary" links, skipping accounts foreach ($contacts as $contact) { - Link::link('infolog',$info['link_to']['to_id'],'addressbook',$contact['id']); + if(empty($contact['account_id'])) + { + Link::link('infolog', $info['link_to']['to_id'], 'addressbook', $contact['id']); + } } } if (is_array($_attachments))