Merge pull request #16536 from nextcloud/backport/16503/stable16

[stable16] allow to provide supported calendar component set internally as a string
This commit is contained in:
Roeland Jago Douma 2019-07-25 15:44:01 +02:00 committed by GitHub
commit c08d2cbda7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -739,7 +739,12 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription
throw new DAV\Exception('The ' . $sccs . ' property must be of type: \Sabre\CalDAV\Property\SupportedCalendarComponentSet'); throw new DAV\Exception('The ' . $sccs . ' property must be of type: \Sabre\CalDAV\Property\SupportedCalendarComponentSet');
} }
$values['components'] = implode(',',$properties[$sccs]->getValue()); $values['components'] = implode(',',$properties[$sccs]->getValue());
} else if (isset($properties['components'])) {
// Allow to provide components internally without having
// to create a SupportedCalendarComponentSet object
$values['components'] = $properties['components'];
} }
$transp = '{' . Plugin::NS_CALDAV . '}schedule-calendar-transp'; $transp = '{' . Plugin::NS_CALDAV . '}schedule-calendar-transp';
if (isset($properties[$transp])) { if (isset($properties[$transp])) {
$values['transparent'] = (int) ($properties[$transp]->getValue() === 'transparent'); $values['transparent'] = (int) ($properties[$transp]->getValue() === 'transparent');