diff options
author | Georg Ehrke <dev@georgswebsite.de> | 2012-07-26 14:46:03 +0200 |
---|---|---|
committer | Georg Ehrke <dev@georgswebsite.de> | 2012-07-26 14:46:03 +0200 |
commit | f7155b42765fe0fb69c36a01750f046f34e9eaaf (patch) | |
tree | ab01ccdab42b31c53fd88f8dd5c8e8474e38e068 /apps | |
parent | ba0ea210744479e7cbf092fe0115c4d27fff1c48 (diff) | |
download | nextcloud-server-f7155b42765fe0fb69c36a01750f046f34e9eaaf.tar.gz nextcloud-server-f7155b42765fe0fb69c36a01750f046f34e9eaaf.zip |
convert through caldav transmitted rgba calendarcolor to rgb
Diffstat (limited to 'apps')
-rw-r--r-- | apps/calendar/lib/connector_sabre.php | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/apps/calendar/lib/connector_sabre.php b/apps/calendar/lib/connector_sabre.php index 263fb7ffde5..8eea06da7e2 100644 --- a/apps/calendar/lib/connector_sabre.php +++ b/apps/calendar/lib/connector_sabre.php @@ -105,6 +105,9 @@ class OC_Connector_Sabre_CalDAV extends Sabre_CalDAV_Backend_Abstract { if(!isset($newValues['timezone'])) $newValues['timezone'] = null; if(!isset($newValues['calendarorder'])) $newValues['calendarorder'] = 0; 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']); } @@ -192,7 +195,10 @@ class OC_Connector_Sabre_CalDAV extends Sabre_CalDAV_Backend_Abstract { if(!isset($newValues['timezone'])) $newValues['timezone'] = null; if(!isset($newValues['calendarorder'])) $newValues['calendarorder'] = 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']); return true; |