From 5b2451dd83717aa739816ad1f1501492729164b3 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Fri, 24 Jul 2015 14:45:38 +0000 Subject: [PATCH] When copying a project, if info_from is the same as the old project name, change it to the new project name --- infolog/inc/class.infolog_datasource.inc.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/infolog/inc/class.infolog_datasource.inc.php b/infolog/inc/class.infolog_datasource.inc.php index 5dc47fc99f..21a3308a7c 100644 --- a/infolog/inc/class.infolog_datasource.inc.php +++ b/infolog/inc/class.infolog_datasource.inc.php @@ -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); }