* InfoLog: keep pm link when changing contact

This commit is contained in:
Ralf Becker 2014-09-09 08:54:05 +00:00
parent d59493596e
commit 725e43609a

View File

@ -1680,7 +1680,15 @@ class infolog_ui
}
$content['info_link_id'] = (int)($info_link_id = egw_link::link('infolog',$content['link_to']['to_id'],$app,$id));
}
if ($old_link_id && $old_link_id != $content['info_link_id']) egw_link::unlink($old_link_id);
if ($old_link_id && $old_link_id != $content['info_link_id'])
{
$link = egw_link::get_link($old_link_id);
// Keep projectmanager link if it's the same project as before
if(!($link['link_app2'] == 'projectmanager' && $link['link_id2'] == $content['old_pm_id']))
{
egw_link::unlink($old_link_id);
}
}
}
if (is_array($content['link_to']['to_id']) && count($content['link_to']['to_id']))
{