mirror of
https://gitlab.com/davical-project/davical.git
synced 2026-08-31 18:46:02 +00:00
add DAVResource->IsProxyCollection()
This commit is contained in:
parent
a7ba436f2f
commit
83e9106160
@ -265,6 +265,8 @@ class DAVResource
|
||||
}
|
||||
else if ( $this->_is_proxy_request ) {
|
||||
$this->resourcetypes = $this->collection->resourcetypes;
|
||||
preg_match( '#^/[^/]+/calendar-proxy-(read|write)/?[^/]*$#', $this->dav_name, $matches );
|
||||
$this->proxy_type = $matches[1];
|
||||
}
|
||||
if ( isset($this->collection->dav_displayname) ) $this->collection->displayname = $this->collection->dav_displayname;
|
||||
}
|
||||
@ -1103,6 +1105,18 @@ EOQRY;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Checks whether this resource is a proxy collection
|
||||
* @param string $type The type of proxy collection, 'read', 'write' or 'any'
|
||||
*/
|
||||
function IsProxyCollection( $type = 'any' ) {
|
||||
if ( $this->_is_proxy_request ) {
|
||||
return ($type == 'any' || $type == $this->proxy_type);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Checks whether this resource is a scheduling inbox/outbox collection
|
||||
* @param string $type The type of scheduling collection, 'inbox', 'outbox' or 'any'
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user