mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-26 08:38:54 +01:00
* InfoLog/CalDAV: fixed sub-entries created in WebGUI got identical caldav_name as parent and therefore updates of sub-entries did not work as expected
This commit is contained in:
parent
dea5bfef24
commit
0037bf4077
@ -1604,6 +1604,7 @@ class infolog_ui
|
||||
$parent = $this->bo->so->data;
|
||||
$content['info_id'] = $info_id = 0;
|
||||
$content['info_uid'] = ''; // ensure that we have our own UID
|
||||
$content['caldav_name'] = ''; // ensure that we have our own caldav_name
|
||||
$content['info_owner'] = $this->user;
|
||||
$content['info_id_parent'] = $parent['info_id'];
|
||||
/*
|
||||
|
@ -12,7 +12,7 @@
|
||||
*/
|
||||
|
||||
$setup_info['infolog']['name'] = 'infolog';
|
||||
$setup_info['infolog']['version'] = '1.9.002';
|
||||
$setup_info['infolog']['version'] = '1.9.003';
|
||||
$setup_info['infolog']['app_order'] = 5;
|
||||
$setup_info['infolog']['tables'] = array('egw_infolog','egw_infolog_extra');
|
||||
$setup_info['infolog']['enable'] = 1;
|
||||
|
@ -680,3 +680,26 @@ function infolog_upgrade1_9_001()
|
||||
|
||||
return $GLOBALS['setup_info']['infolog']['currentver'] = '1.9.002';
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Fix caldav_name of subentries is identical with parent
|
||||
*/
|
||||
function infolog_upgrade1_9_002()
|
||||
{
|
||||
$ids = array();
|
||||
foreach($GLOBALS['egw_setup']->db->query('SELECT sub.info_id
|
||||
FROM egw_infolog sub
|
||||
JOIN egw_infolog parent ON sub.info_id_parent=parent.info_id
|
||||
WHERE parent.caldav_name=sub.caldav_name',__LINE__,__FILE__) as $row)
|
||||
{
|
||||
$ids[] = $row['info_id'];
|
||||
}
|
||||
if ($ids)
|
||||
{
|
||||
$GLOBALS['egw_setup']->db->query('UPDATE egw_infolog SET caldav_name='.
|
||||
$GLOBALS['egw_setup']->db->concat('info_id',"'.ics'").
|
||||
' WHERE info_id IN ('.implode(',',$ids).')',__LINE__,__FILE__);
|
||||
}
|
||||
return $GLOBALS['setup_info']['infolog']['currentver'] = '1.9.003';
|
||||
}
|
Loading…
Reference in New Issue
Block a user