mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-13 09:28:29 +01:00
Infolog: Skip all user accounts for importing mail -> infolog entry, contacts only
This commit is contained in:
parent
02e35d609f
commit
1cdd0ac383
@ -1472,18 +1472,24 @@ class infolog_bo
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
// Remove all accounts
|
||||||
|
$contacts = array_filter($contacts, function ($v)
|
||||||
|
{
|
||||||
|
return empty($v['account_id']);
|
||||||
|
});
|
||||||
|
|
||||||
// create the first address as info_contact
|
// create the first address as info_contact
|
||||||
|
if(count($contacts) > 0)
|
||||||
|
{
|
||||||
$contact = array_shift($contacts);
|
$contact = array_shift($contacts);
|
||||||
$info['info_contact'] = 'addressbook:' . $contact['id'];
|
$info['info_contact'] = 'addressbook:' . $contact['id'];
|
||||||
|
}
|
||||||
// create the rest as "ordinary" links, skipping accounts
|
// create the rest as "ordinary" links, skipping accounts
|
||||||
foreach ($contacts as $contact)
|
foreach ($contacts as $contact)
|
||||||
{
|
|
||||||
if(empty($contact['account_id']))
|
|
||||||
{
|
{
|
||||||
Link::link('infolog', $info['link_to']['to_id'], 'addressbook', $contact['id']);
|
Link::link('infolog', $info['link_to']['to_id'], 'addressbook', $contact['id']);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
if (is_array($_attachments))
|
if (is_array($_attachments))
|
||||||
{
|
{
|
||||||
foreach ($_attachments as $attachment)
|
foreach ($_attachments as $attachment)
|
||||||
|
Loading…
Reference in New Issue
Block a user