convert through caldav transmitted rgba calendarcolor to rgb
This commit is contained in:
parent
12dfe5868a
commit
8cff0d997f
|
@ -105,6 +105,9 @@ class OC_Connector_Sabre_CalDAV extends Sabre_CalDAV_Backend_Abstract {
|
||||||
if(!isset($newValues['timezone'])) $newValues['timezone'] = null;
|
if(!isset($newValues['timezone'])) $newValues['timezone'] = null;
|
||||||
if(!isset($newValues['calendarorder'])) $newValues['calendarorder'] = 0;
|
if(!isset($newValues['calendarorder'])) $newValues['calendarorder'] = 0;
|
||||||
if(!isset($newValues['calendarcolor'])) $newValues['calendarcolor'] = null;
|
if(!isset($newValues['calendarcolor'])) $newValues['calendarcolor'] = null;
|
||||||
|
if(!is_null($newValues['calendarcolor']) && strlen($newValues['calendarcolor']) == 9){
|
||||||
|
$newValues['calendarcolor'] = substr($newValues['calendarcolor'], 0, 7);
|
||||||
|
}
|
||||||
|
|
||||||
return OC_Calendar_Calendar::addCalendarFromDAVData($principalUri,$calendarUri,$newValues['displayname'],$newValues['components'],$newValues['timezone'],$newValues['calendarorder'],$newValues['calendarcolor']);
|
return OC_Calendar_Calendar::addCalendarFromDAVData($principalUri,$calendarUri,$newValues['displayname'],$newValues['components'],$newValues['timezone'],$newValues['calendarorder'],$newValues['calendarcolor']);
|
||||||
}
|
}
|
||||||
|
@ -192,6 +195,9 @@ class OC_Connector_Sabre_CalDAV extends Sabre_CalDAV_Backend_Abstract {
|
||||||
if(!isset($newValues['timezone'])) $newValues['timezone'] = null;
|
if(!isset($newValues['timezone'])) $newValues['timezone'] = null;
|
||||||
if(!isset($newValues['calendarorder'])) $newValues['calendarorder'] = null;
|
if(!isset($newValues['calendarorder'])) $newValues['calendarorder'] = null;
|
||||||
if(!isset($newValues['calendarcolor'])) $newValues['calendarcolor'] = null;
|
if(!isset($newValues['calendarcolor'])) $newValues['calendarcolor'] = null;
|
||||||
|
if(!is_null($newValues['calendarcolor']) && strlen($newValues['calendarcolor']) == 9){
|
||||||
|
$newValues['calendarcolor'] = substr($newValues['calendarcolor'], 0, 7);
|
||||||
|
}
|
||||||
|
|
||||||
OC_Calendar_Calendar::editCalendar($calendarId,$newValues['displayname'],null,$newValues['timezone'],$newValues['calendarorder'],$newValues['calendarcolor']);
|
OC_Calendar_Calendar::editCalendar($calendarId,$newValues['displayname'],null,$newValues['timezone'],$newValues['calendarorder'],$newValues['calendarcolor']);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue