diff --git a/infolog/inc/class.boinfolog.inc.php b/infolog/inc/class.boinfolog.inc.php index 2dbb83b35b..d6f8896be6 100644 --- a/infolog/inc/class.boinfolog.inc.php +++ b/infolog/inc/class.boinfolog.inc.php @@ -131,7 +131,7 @@ function link_id2from(&$info,$not_app='',$not_id='') { - //echo "

boinfolog::link_id2title(subject='$info[info_subject]', link_id='$info[info_link_id], from='$info[info_from]')"; + //echo "

boinfolog::link_id2from(subject='$info[info_subject]', link_id='$info[info_link_id], from='$info[info_from]')"; if ($info['info_link_id'] > 0 && ($link = $this->link->get_link($info['info_link_id'])) !== False) { @@ -165,7 +165,7 @@ { $data['info_subject'] = ''; } - $data['info_link_title'] = $this->link_id2title($data,$data['info_link_view']); + $this->link_id2from($data); if ($data['info_link_title'] == $data['info_from']) { $data['info_from'] = ''; @@ -205,9 +205,9 @@ { $values['info_subject'] = substr($values['info_des'],0,60).' ...'; } - if ($values['info_link_id'] && $values['info_from'] == '') + if ($values['info_link_id'] && empty($values['info_from'])) { - $values['info_from'] = $this->link_id2title($values); + $this->link_id2from($values); } } $values['info_datemodified'] = time(); diff --git a/infolog/inc/class.uiinfolog.inc.php b/infolog/inc/class.uiinfolog.inc.php index d3db4b2fae..966614fc94 100644 --- a/infolog/inc/class.uiinfolog.inc.php +++ b/infolog/inc/class.uiinfolog.inc.php @@ -96,7 +96,7 @@ } $info['info_des'] = nl2br($info['info_des']); $info['info_anz_subs'] = $this->bo->anzSubs($id); - $this->bo->link_id2from($info,$action,$action_id); + $this->bo->link_id2from($info,$action,$action_id); // unset from for $action:$action_id $readonlys["edit[$id]"] = !$this->bo->check_access($id,PHPGW_ACL_EDIT); $readonlys["delete[$id]"] = !$this->bo->check_access($id,PHPGW_ACL_DELETE); @@ -286,10 +286,6 @@ $info_link_id = $content['info_link_id']; $content['info_link_id'] = 0; // as field has to be int } - if ($content['info_link_id'] && empty($content['info_from'])) - { - $this->bo->link_id2from($content); - } $this->bo->write($content); if (!$info_id && is_array($content['link_to']['to_id'])) // writing link for new entry @@ -302,10 +298,6 @@ $link = $this->link->get_link('infolog',$content['info_id'],$app,$id); $content['info_link_id'] = $link['link_id']; - if (empty($content['info_from'])) - { - $this->bo->link_id2from($content); - } $this->bo->write(array( 'info_id' => $content['info_id'], 'info_link_id' => $content['info_link_id'],