Infolog: Fix blank link / contact rows added to entry history

This commit is contained in:
nathan 2024-08-06 14:33:16 -06:00
parent 835cb25fb9
commit 26fd4311a6
2 changed files with 2 additions and 2 deletions

View File

@ -1045,7 +1045,7 @@ class infolog_bo
if ($values['info_id'] && $info_id) if ($values['info_id'] && $info_id)
{ {
$this->write_check_links($to_write); $this->write_check_links($to_write);
if(!$values['info_link_id'] || $values['info_link_id'] != $to_write['info_link_id']) if(!$values['info_link_id'] || $values['info_link_id'] != $to_write['info_link_id'] || $old['info_from'] != $to_write['info_from'])
{ {
// Just got a link ID, need to save it // Just got a link ID, need to save it
unset($to_write['info_etag']); // we must not increment it again unset($to_write['info_etag']); // we must not increment it again

View File

@ -2328,7 +2328,7 @@ class infolog_ui
if(is_array($pm_links)) if(is_array($pm_links))
{ {
$old_pm_id = $content['pm_id'] && in_array($content['pm_id'], $pm_links) ? $content['pm_id'] : array_shift($pm_links); $old_pm_id = ($content['pm_id'] && in_array($content['pm_id'], $pm_links) ? $content['pm_id'] : array_shift($pm_links)) ?? "";
} }
else else
{ {