diff --git a/calendar/inc/class.calendar_groupdav.inc.php b/calendar/inc/class.calendar_groupdav.inc.php index 7e589fc421..0609529505 100644 --- a/calendar/inc/class.calendar_groupdav.inc.php +++ b/calendar/inc/class.calendar_groupdav.inc.php @@ -105,7 +105,7 @@ class calendar_groupdav extends groupdav_handler ); if ($calendar_data) { - $content = ExecMethod2('calendar.boical.exportVCal',array($event),'2.0','PUBLISH',false); + $content = ExecMethod2('calendar.boical.exportVCal',array($event),'2.0','PUBLISH',false,false); $props[] = HTTP_WebDAV_Server::mkprop('getcontentlength',bytes($content)); $props[] = HTTP_WebDAV_Server::mkprop(groupdav::CALDAV,'calendar-data',$content); } @@ -246,7 +246,7 @@ class calendar_groupdav extends groupdav_handler { return $event; } - $options['data'] = ExecMethod2('calendar.boical.exportVCal',array($event),'2.0','PUBLISH',false); + $options['data'] = ExecMethod2('calendar.boical.exportVCal',array($event),'2.0','PUBLISH',false,false); $options['mimetype'] = 'text/calendar; charset=utf-8'; header('Content-Encoding: identity'); header('ETag: '.$this->get_etag($event)); diff --git a/calendar/inc/class.calendar_ical.inc.php b/calendar/inc/class.calendar_ical.inc.php index 6134bcd1fd..4d1d4a7d82 100644 --- a/calendar/inc/class.calendar_ical.inc.php +++ b/calendar/inc/class.calendar_ical.inc.php @@ -109,9 +109,10 @@ class calendar_ical extends calendar_boupdate * @param string $method='PUBLISH' * @param boolean $force_own_uid=true ignore the stored and maybe from the client transfered uid and generate a new one * RalfBecker: GroupDAV/CalDAV requires to switch that non RFC conform behavior off, dont know if SyncML still needs it + * @param boolean $extra_charset_attribute=true GroupDAV/CalDAV dont need the charset attribute and some clients have problems with it * @return string/boolean string with vCal or false on error (eg. no permission to read the event) */ - function &exportVCal($events,$version='1.0', $method='PUBLISH',$force_own_uid=true) + function &exportVCal($events,$version='1.0', $method='PUBLISH',$force_own_uid=true,$extra_charset_attribute=true) { $egwSupportedFields = array( 'CLASS' => array('dbName' => 'public'), @@ -442,7 +443,7 @@ class calendar_ical extends calendar_boupdate { $options['ENCODING'] = 'QUOTED-PRINTABLE'; } - if(preg_match('/([\177-\377])/',$valueData)) + if($extra_charset_attribute && preg_match('/([\177-\377])/',$valueData)) { $options['CHARSET'] = 'UTF-8'; }