From 315f5c74ed56e8f6bed8529aa8864b00219a5b19 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Fri, 27 Jun 2003 10:24:34 +0000 Subject: [PATCH] existing links are not copied to new sub-projects, fixed now --- infolog/inc/class.uiinfolog.inc.php | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/infolog/inc/class.uiinfolog.inc.php b/infolog/inc/class.uiinfolog.inc.php index 378c5d59b0..181f20197d 100644 --- a/infolog/inc/class.uiinfolog.inc.php +++ b/infolog/inc/class.uiinfolog.inc.php @@ -167,7 +167,7 @@ { list($do,$do_id) = isset($values['main']) ? each($values['main']) : @each($values['nm']['rows']); list($do_id) = @each($do_id); - //echo "

infolog::index: do='$do/$do_id', referer="; _debug_array($referer); + echo "

infolog::index: do='$do/$do_id', referer="; _debug_array($referer); switch($do) { case 'edit': @@ -243,13 +243,14 @@ /*! @function edit - @syntax edit( $content=0,$action='',$action_id=0,$type='' ) + @syntax edit( $content=0,$action='',$action_id=0,$type='',$referer='' ) @author ralfbecker @abstract Edit/Create an InfoLog Entry @param $content Content from the eTemplate Exec call or info_id on inital call @param $action Name of an app of 'sp' for a infolog-sub @param $action_id Id of app-entry to which a link is created @param $type Type of log-entry: note,todo,task + @param $referer array with param/get-vars of the refering page */ function edit($content = 0,$action = '',$action_id=0,$type='',$referer='') { @@ -367,6 +368,16 @@ switch ($action) { case 'sp': + $links = $this->bo->link->get_links('infolog',$parent['info_id'],'!'.$this->bo->link->vfs_appname); + foreach($links as $link) + { + $link_id = $this->link->link('infolog',$content['link_to']['to_id'],$link['app'],$link['id'],$link['remark']); + + if ($parent['info_link_id'] == $link['link_id']) + { + $content['info_link_id'] = $link_id; + } + } break; case 'addressbook': case 'projects':