mirror of
https://gitlab.com/davical-project/davical.git
synced 2026-08-20 16:56:02 +00:00
Provide correct getcontenttype property for addressbook resources.
This commit is contained in:
parent
5ebbb198e9
commit
1e22e9a8a1
@ -259,7 +259,12 @@ class DAVResource
|
||||
else {
|
||||
$this->resourcetypes = '';
|
||||
if ( isset($this->resource->caldav_data) ) {
|
||||
if ( substr($this->resource->caldav_data,0,15) == 'BEGIN:VCALENDAR' ) $this->contenttype = 'text/calendar';
|
||||
if ( substr($this->resource->caldav_data,0,15) == 'BEGIN:VCALENDAR' ) {
|
||||
$this->contenttype = 'text/calendar';
|
||||
}
|
||||
else if ( isset($this->resource->fn) ) {
|
||||
$this->contenttype = 'text/vcard';
|
||||
}
|
||||
$this->resource->displayname = $this->resource->summary;
|
||||
}
|
||||
}
|
||||
@ -523,6 +528,9 @@ EOQRY;
|
||||
if ( substr($this->resource->caldav_data,0,15) == 'BEGIN:VCALENDAR' ) {
|
||||
$this->contenttype = 'text/calendar';
|
||||
}
|
||||
else if ( isset($this->resource->fn) ) {
|
||||
$this->contenttype = 'text/vcard';
|
||||
}
|
||||
$this->resourcetypes = '';
|
||||
}
|
||||
else {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user