diff --git a/calendar/inc/class.calendar_groupdav.inc.php b/calendar/inc/class.calendar_groupdav.inc.php index 0828f01737..425eaf66af 100644 --- a/calendar/inc/class.calendar_groupdav.inc.php +++ b/calendar/inc/class.calendar_groupdav.inc.php @@ -552,6 +552,19 @@ error_log(__METHOD__."($path,,".array2string($start).") filter=".array2string($f 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(): * 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) { - $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 (!$return_no_access) diff --git a/phpgwapi/inc/class.groupdav.inc.php b/phpgwapi/inc/class.groupdav.inc.php index b686c13f1c..89d0baa660 100644 --- a/phpgwapi/inc/class.groupdav.inc.php +++ b/phpgwapi/inc/class.groupdav.inc.php @@ -389,6 +389,9 @@ class groupdav extends HTTP_WebDAV_Server case 'calendar': $props[] = self::mkprop(groupdav::CALDAV,'calendar-home-set',array( 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; case 'infolog': $props[] = self::mkprop(groupdav::CALDAV,'calendar-home-set',array( @@ -645,6 +648,34 @@ class groupdav extends HTTP_WebDAV_Server 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 *