Merge pull request #4168 from nextcloud/backport-4166-invalid-int-for-transparency-on-calendars-10
[stable10] Make sure transparency is an integer when saving a calendar
This commit is contained in:
commit
b0ab3b628a
|
@ -372,7 +372,7 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription
|
||||||
}
|
}
|
||||||
$transp = '{' . Plugin::NS_CALDAV . '}schedule-calendar-transp';
|
$transp = '{' . Plugin::NS_CALDAV . '}schedule-calendar-transp';
|
||||||
if (isset($properties[$transp])) {
|
if (isset($properties[$transp])) {
|
||||||
$values['transparent'] = $properties[$transp]->getValue()==='transparent';
|
$values['transparent'] = (int) ($properties[$transp]->getValue() === 'transparent');
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach($this->propertyMap as $xmlName=>$dbName) {
|
foreach($this->propertyMap as $xmlName=>$dbName) {
|
||||||
|
@ -416,7 +416,7 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription
|
||||||
switch ($propertyName) {
|
switch ($propertyName) {
|
||||||
case '{' . Plugin::NS_CALDAV . '}schedule-calendar-transp' :
|
case '{' . Plugin::NS_CALDAV . '}schedule-calendar-transp' :
|
||||||
$fieldName = 'transparent';
|
$fieldName = 'transparent';
|
||||||
$newValues[$fieldName] = $propertyValue->getValue() === 'transparent';
|
$newValues[$fieldName] = (int) ($propertyValue->getValue() === 'transparent');
|
||||||
break;
|
break;
|
||||||
default :
|
default :
|
||||||
$fieldName = $this->propertyMap[$propertyName];
|
$fieldName = $this->propertyMap[$propertyName];
|
||||||
|
|
Loading…
Reference in New Issue