mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-08 23:19:04 +01:00
* Calendar/CalDAV: deleting of recurrences under Android (eg. CalDAV Sync app) did not work
Android sets STATUS: CANCELLED instead of adding event to EXDATE of master, as other CalDAV clients do
This commit is contained in:
parent
d5af9a5e2c
commit
61a20467e8
@ -1491,6 +1491,19 @@ class calendar_ical extends calendar_boupdate
|
|||||||
. array2string($event)."\n",3,$this->logfile);
|
. array2string($event)."\n",3,$this->logfile);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Android (any maybe others) delete recurrences by setting STATUS: CANCELLED
|
||||||
|
// as we ignore STATUS we have to delete the recurrence by calling delete
|
||||||
|
if (in_array($event_info['type'], array('SERIES-EXCEPTION', 'SERIES-EXCEPTION-PROPAGATE', 'SERIES-PSEUDO-EXCEPTION')) &&
|
||||||
|
$event['status'] == 'CANCELLED')
|
||||||
|
{
|
||||||
|
if (!$this->delete($event['id'] ? $event['id'] : $cal_id, $event['recurrence']))
|
||||||
|
{
|
||||||
|
// delete fails (because no rights), reject recurrence
|
||||||
|
$this->set_status($event['id'] ? $event['id'] : $cal_id, $this->user, 'R', $event['recurrence']);
|
||||||
|
}
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
// save event depending on the given event type
|
// save event depending on the given event type
|
||||||
switch ($event_info['type'])
|
switch ($event_info['type'])
|
||||||
{
|
{
|
||||||
@ -2925,6 +2938,10 @@ class calendar_ical extends calendar_boupdate
|
|||||||
// fall through
|
// fall through
|
||||||
case 'LAST-MODIFIED': // will be written direct to the event
|
case 'LAST-MODIFIED': // will be written direct to the event
|
||||||
$event['modified'] = $attributes['value'];
|
$event['modified'] = $attributes['value'];
|
||||||
|
break;
|
||||||
|
case 'STATUS': // currently no EGroupware event column, but needed as Android uses it to delete single recurrences
|
||||||
|
$event['status'] = $attributes['value'];
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// check if the entry is a birthday
|
// check if the entry is a birthday
|
||||||
|
Loading…
Reference in New Issue
Block a user