forked from extern/egroupware
Fix CalDAV invitation issue (Stylite#513)
This commit is contained in:
parent
8a6b862489
commit
27f1fef944
@ -552,6 +552,19 @@ error_log(__METHOD__."($path,,".array2string($start).") filter=".array2string($f
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Handle post request for a schedule entry
|
||||||
|
*
|
||||||
|
* @param array &$options
|
||||||
|
* @param int $id
|
||||||
|
* @param int $user=null account_id of owner, default null
|
||||||
|
* @return mixed boolean true on success, false on failure or string with http status (eg. '404 Not Found')
|
||||||
|
*/
|
||||||
|
function post(&$options,$id,$user=null)
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Fix event series with exceptions, called by calendar_ical::importVCal():
|
* Fix event series with exceptions, called by calendar_ical::importVCal():
|
||||||
* a) only series master = first event got cal_id from URL
|
* a) only series master = first event got cal_id from URL
|
||||||
@ -637,7 +650,7 @@ error_log(__METHOD__."($path,,".array2string($start).") filter=".array2string($f
|
|||||||
*/
|
*/
|
||||||
function delete(&$options,$id)
|
function delete(&$options,$id)
|
||||||
{
|
{
|
||||||
$return_no_access=true; // to allow to check if current use is a participant and reject the event for him
|
$return_no_access = true; // to allow to check if current use is a participant and reject the event for him
|
||||||
if (!is_array($event = $this->_common_get_put_delete('DELETE',$options,$id,$return_no_access)) || !$return_no_access)
|
if (!is_array($event = $this->_common_get_put_delete('DELETE',$options,$id,$return_no_access)) || !$return_no_access)
|
||||||
{
|
{
|
||||||
if (!$return_no_access)
|
if (!$return_no_access)
|
||||||
|
@ -389,6 +389,9 @@ class groupdav extends HTTP_WebDAV_Server
|
|||||||
case 'calendar':
|
case 'calendar':
|
||||||
$props[] = self::mkprop(groupdav::CALDAV,'calendar-home-set',array(
|
$props[] = self::mkprop(groupdav::CALDAV,'calendar-home-set',array(
|
||||||
self::mkprop('href',$this->base_uri.$path.'calendar/')));
|
self::mkprop('href',$this->base_uri.$path.'calendar/')));
|
||||||
|
// OUTBOX URLs of the current user
|
||||||
|
$props[] = self::mkprop(groupdav::CALDAV,'schedule-outbox-URL',
|
||||||
|
array(self::mkprop(groupdav::DAV,'href',$this->base_uri.'/calendar/')));
|
||||||
break;
|
break;
|
||||||
case 'infolog':
|
case 'infolog':
|
||||||
$props[] = self::mkprop(groupdav::CALDAV,'calendar-home-set',array(
|
$props[] = self::mkprop(groupdav::CALDAV,'calendar-home-set',array(
|
||||||
@ -645,6 +648,34 @@ class groupdav extends HTTP_WebDAV_Server
|
|||||||
return $arr;
|
return $arr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* POST method handler
|
||||||
|
*
|
||||||
|
* @param array parameter passing array
|
||||||
|
* @return bool true on success
|
||||||
|
*/
|
||||||
|
function POST(&$options)
|
||||||
|
{
|
||||||
|
// read the content in a string, if a stream is given
|
||||||
|
if (isset($options['stream']))
|
||||||
|
{
|
||||||
|
$options['content'] = '';
|
||||||
|
while(!feof($options['stream']))
|
||||||
|
{
|
||||||
|
$options['content'] .= fread($options['stream'],8192);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if ($this->debug) error_log(__METHOD__.'('.array2string($options).')');
|
||||||
|
|
||||||
|
$this->_parse_path($options['path'],$id,$app,$user);
|
||||||
|
|
||||||
|
if (($handler = self::app_handler($app)) && method_exists($handler, 'post'))
|
||||||
|
{
|
||||||
|
return $handler->post($options,$id,$user);
|
||||||
|
}
|
||||||
|
return '501 Not Implemented';
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* PUT method handler
|
* PUT method handler
|
||||||
*
|
*
|
||||||
|
Loading…
Reference in New Issue
Block a user