mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-24 00:43:20 +01:00
* CalDAV/Calendar: dealing with Thunderbird setting partipant status on organizer
If secritary creates an event in the owners calendar the owner/organizer is on status NEEDS-ACTION. Accepting that event in Thunderbird set PARTSTAT=ACCEPTED on ORGANIZER, while ATTENDEE is still on PARTSTAT=NEEDS-ACTION. In that case prefer the PARTSTAT from ORGANIZER over ATTENDEE. In my opionion Thunderbird behavior is wrong, thought that fix does not do any other harm, as no other client sets PARTSTAT in ORGANIZER.
This commit is contained in:
parent
295dccefa8
commit
a495aeaf07
@ -2488,6 +2488,7 @@ class calendar_ical extends calendar_boupdate
|
|||||||
$isDate = false;
|
$isDate = false;
|
||||||
$event = array();
|
$event = array();
|
||||||
$alarms = array();
|
$alarms = array();
|
||||||
|
$organizer_status = $organizer_uid = null;
|
||||||
$vcardData = array(
|
$vcardData = array(
|
||||||
'recur_type' => MCAL_RECUR_NONE,
|
'recur_type' => MCAL_RECUR_NONE,
|
||||||
'recur_exception' => array(),
|
'recur_exception' => array(),
|
||||||
@ -3056,7 +3057,11 @@ class calendar_ical extends calendar_boupdate
|
|||||||
// for multiple entries the ACCEPT wins
|
// for multiple entries the ACCEPT wins
|
||||||
// add quantity and role
|
// add quantity and role
|
||||||
$vcardData['participants'][$uid] =
|
$vcardData['participants'][$uid] =
|
||||||
calendar_so::combine_status($status, $quantity, $role);
|
calendar_so::combine_status(
|
||||||
|
// Thunderbird: if there is a PARTICIPANT for the ORGANIZER AND ORGANZIER has PARTSTAT
|
||||||
|
// --> use the one from ORGANIZER
|
||||||
|
$uid === $organizer_uid && !empty($organizer_status) && $organizer_status !== 'X' ?
|
||||||
|
$organizer_status : $status, $quantity, $role);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
if (!$this->calendarOwner && is_numeric($uid) && $role == 'CHAIR')
|
if (!$this->calendarOwner && is_numeric($uid) && $role == 'CHAIR')
|
||||||
@ -3071,6 +3076,9 @@ class calendar_ical extends calendar_boupdate
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case 'ORGANIZER':
|
case 'ORGANIZER':
|
||||||
|
// remember evtl. set PARTSTAT from ORGANIZER, as TB sets it on ORGANIZER not PARTICIPANT!
|
||||||
|
$organizer_uid = $uid;
|
||||||
|
$organizer_status = $status;
|
||||||
if (isset($vcardData['participants'][$uid]))
|
if (isset($vcardData['participants'][$uid]))
|
||||||
{
|
{
|
||||||
$status = $vcardData['participants'][$uid];
|
$status = $vcardData['participants'][$uid];
|
||||||
|
Loading…
Reference in New Issue
Block a user