fixed not working setting of links for new entries after r34606

This commit is contained in:
Ralf Becker 2011-04-12 11:53:34 +00:00
parent 93540e1604
commit 2e4c048e9e
2 changed files with 9 additions and 5 deletions

View File

@ -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;
}

View File

@ -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']))
{