The uri-id is now in all contact tables

This commit is contained in:
Michael 2021-07-09 07:09:33 +00:00
parent c63d3f4604
commit 6e79da0b0c
7 changed files with 51 additions and 27 deletions

View file

@ -349,6 +349,12 @@ class APContact
$apcontact['alias'] = null;
}
if (empty($apcontact['uuid'])) {
$apcontact['uri-id'] = ItemURI::getIdByURI($apcontact['url']);
} else {
$apcontact['uri-id'] = ItemURI::insert(['uri' => $apcontact['uri'], 'guid' => $apcontact['uuid']]);
}
$apcontact['updated'] = DateTimeFormat::utcNow();
// We delete the old entry when the URL is changed