From 2e4c048e9e171d0e948485746c55c40dc5f92bfe Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Tue, 12 Apr 2011 11:53:34 +0000 Subject: [PATCH] fixed not working setting of links for new entries after r34606 --- infolog/inc/class.infolog_bo.inc.php | 10 +++++++--- infolog/inc/class.infolog_ui.inc.php | 4 ++-- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/infolog/inc/class.infolog_bo.inc.php b/infolog/inc/class.infolog_bo.inc.php index f85fd401b9..7cecce3539 100644 --- a/infolog/inc/class.infolog_bo.inc.php +++ b/infolog/inc/class.infolog_bo.inc.php @@ -671,8 +671,9 @@ class infolog_bo * * @return int/boolean info_id on a successfull write or false */ - function write(&$values, $check_defaults=true, $touch_modified=true, $user2server=true, $skip_notification=false) + function write(&$values_in, $check_defaults=true, $touch_modified=true, $user2server=true, $skip_notification=false) { + $values = $values_in; //echo "boinfolog::write()values="; _debug_array($values); if (!$values['info_id'] && !$this->check_access(0,EGW_ACL_EDIT,$values['info_owner']) && !$this->check_access(0,EGW_ACL_ADD,$values['info_owner'])) @@ -921,9 +922,12 @@ class infolog_bo } $this->tracking->track($to_write,$old,$this->user,$values['info_status'] == 'deleted' || $old['info_status'] == 'deleted', null,$skip_notification); - } - if ($info_from_set) $values['info_from'] = ''; + if ($info_from_set) $values['info_from'] = ''; + + // merge changes (keeping extra values from the UI) + $values_in = array_merge($values_in,$values); + } return $info_id; } diff --git a/infolog/inc/class.infolog_ui.inc.php b/infolog/inc/class.infolog_ui.inc.php index af012ac1c6..6c844a4901 100644 --- a/infolog/inc/class.infolog_ui.inc.php +++ b/infolog/inc/class.infolog_ui.inc.php @@ -34,7 +34,7 @@ class infolog_ui /** * instance of the bo-class * - * @var boinfolog + * @var infolog_bo */ var $bo; /** @@ -1210,7 +1210,7 @@ class infolog_ui $old_link_id = (int)$content['info_link_id']; list($app,$id) = explode(':',$content['info_contact'], 2); $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']) egw_link::unlink($old_link_id); } if (is_array($content['link_to']['to_id']) && count($content['link_to']['to_id'])) {