mirror of
https://gitlab.com/davical-project/davical.git
synced 2026-05-27 02:54:27 +00:00
Add component parameter to content-types headers and getcontenttype properties
This allows clients to filter the results quickly by just looking at the content-type without having to parse the calendar data.
This commit is contained in:
parent
642524d391
commit
f5dc6c669f
@ -274,6 +274,7 @@ class DAVResource
|
||||
if ( isset($this->resource->summary) )$this->resource->displayname = $this->resource->summary;
|
||||
if ( strtoupper(substr($this->resource->caldav_data,0,15)) == 'BEGIN:VCALENDAR' ) {
|
||||
$this->contenttype = 'text/calendar';
|
||||
if ( isset($this->resource->caldav_type) ) $this->contenttype .= "; component=" . strtolower($this->resource->caldav_type);
|
||||
if ( !$this->HavePrivilegeTo('read') && $this->HavePrivilegeTo('read-free-busy') ) {
|
||||
$vcal = new iCalComponent($this->resource->caldav_data);
|
||||
$confidential = $vcal->CloneConfidential();
|
||||
|
||||
@ -72,7 +72,7 @@ switch( $resource->caldav_type ) {
|
||||
case 'VJOURNAL':
|
||||
case 'VEVENT':
|
||||
case 'VTODO':
|
||||
$contenttype = 'text/calendar';
|
||||
$contenttype = 'text/calendar; component=' . strtolower($resource->caldav_type);
|
||||
break;
|
||||
|
||||
case 'VCARD':
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user