mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-25 16:19:00 +01:00
Infolog: Skip all user accounts for importing mail -> infolog entry, contacts only
This commit is contained in:
parent
02e35d609f
commit
1cdd0ac383
@ -1472,16 +1472,22 @@ 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
|
||||||
$contact = array_shift($contacts);
|
if(count($contacts) > 0)
|
||||||
$info['info_contact'] = 'addressbook:'.$contact['id'];
|
{
|
||||||
|
$contact = array_shift($contacts);
|
||||||
|
$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))
|
||||||
|
Loading…
Reference in New Issue
Block a user