various cheduling related fixes (there are still few remaining bugs)

This commit is contained in:
Ján Máté committed 2014-05-14 13:34:06 +02:00
1 parent 822e81644d
commit 92f48f38cd
1 file changed
+5 -6
+5 -6
View File
@@ -116,8 +116,8 @@ function doItipAttendeeReply( vCalendar $resource, $partstat ) {
$organizer_calendar = new WritableCollection(array('path' => $collection_path)); $organizer_calendar = new WritableCollection(array('path' => $collection_path));
$organizer_inbox = new WritableCollection(array('path' => $organizer_principal->internal_url('schedule-inbox'))); $organizer_inbox = new WritableCollection(array('path' => $organizer_principal->internal_url('schedule-inbox')));
$schedule_reply = GetItip(new vCalendar($row->caldav_data),'REPLY',$attendee->Value()); $schedule_reply = GetItip(new vCalendar($vcal->Render(null, true)), 'REPLY', $attendee->Value(), array('CUTYPE'=>true, 'SCHEDULE-STATUS'=>true));
$schedule_request = GetItip(new vCalendar($row->caldav_data),'REQUEST',null); $schedule_request = GetItip(new vCalendar($row->caldav_data), 'REQUEST', null);
dbg_error_log( 'schedule', 'Writing ATTENDEE scheduling REPLY from %s to %s', $request->principal->email(), $organizer_principal->email() ); dbg_error_log( 'schedule', 'Writing ATTENDEE scheduling REPLY from %s to %s', $request->principal->email(), $organizer_principal->email() );
@@ -184,12 +184,11 @@ function doItipAttendeeReply( vCalendar $resource, $partstat ) {
return true; return true;
} }
function GetItip( VCalendar $vcal, $method, $attendee_value ) { function GetItip( VCalendar $vcal, $method, $attendee_value, $clear_attendee_parameters = null ) {
$iTIP = $vcal->GetItip($method, $attendee_value, $clear_attendee_parameters );
$iTIP = $vcal->GetItip($method, $attendee_value );
$iTIP->AddProperty('REQUEST-STATUS','2.0');
$components = $iTIP->GetComponents(); $components = $iTIP->GetComponents();
foreach( $components AS $comp ) { foreach( $components AS $comp ) {
$comp->AddProperty('REQUEST-STATUS','2.0');
$properties = array(); $properties = array();
foreach( $comp->GetProperties() AS $k=> $property ) { foreach( $comp->GetProperties() AS $k=> $property ) {
switch( $property->Name() ) { switch( $property->Name() ) {