When copying a project, if info_from is the same as the old project name, change it to the new project name

This commit is contained in:
Ralf Becker 2015-07-24 14:45:38 +00:00
parent 2e670ae0f4
commit 5b2451dd83

View File

@ -116,8 +116,9 @@ class infolog_datasource extends datasource
if(!($info['info_id'] = $this->infolog_bo->write($info))) return false;
// link the new infolog against the project and setting info_link_id and evtl. info_from
$old_link = $info['info_link_id'] ? egw_link::get_link($info['info_link']) : $info['info_link'];
$info['info_link_id'] = egw_link::link('projectmanager',$target,'infolog',$info['info_id'],$element['pe_remark'],0,0,1);
if (!$info['info_from'])
if (!$info['info_from'] || $old_link && $info['info_from'] == $old_link['title'])
{
$info['info_from'] = egw_link::title('projectmanager',$target);
}