* Addressbook: Fix files and entries linked to a new contact were not saved

This commit is contained in:
nathangray 2019-11-04 11:48:40 -07:00
parent 724b2ad329
commit ca6ea3a436

View File

@ -2304,7 +2304,7 @@ class addressbook_ui extends addressbook_bo
} }
else else
{ {
if (is_numeric($contact_id)) $content['link_to']['to_id'] = $contact_id; if ($contact_id && is_numeric($contact_id)) $content['link_to']['to_id'] = $contact_id;
} }
// automatic link new entries to entries specified in the url // automatic link new entries to entries specified in the url
if (!$contact_id && isset($_REQUEST['link_app']) && isset($_REQUEST['link_id']) && !is_array($content['link_to']['to_id'])) if (!$contact_id && isset($_REQUEST['link_app']) && isset($_REQUEST['link_id']) && !is_array($content['link_to']['to_id']))
@ -2943,7 +2943,7 @@ class addressbook_ui extends addressbook_bo
{ {
return array($contact_id); return array($contact_id);
} }
$query['num_rows'] = -1; $query['num_rows'] = -1;
$query['start'] = 0; $query['start'] = 0;
if(!array_key_exists('filter', $query)) if(!array_key_exists('filter', $query))