From d9c64f436e83b8b8a7ebaa35d71e8325f2c0309c Mon Sep 17 00:00:00 2001 From: Rob Ostensen Date: Tue, 31 Jan 2012 01:08:17 -0600 Subject: [PATCH] ischedule: correctly set the attendee value on freebusy replies, this one actually works --- inc/iSchedule-POST.php | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/inc/iSchedule-POST.php b/inc/iSchedule-POST.php index 1c62dc66..372e7c78 100644 --- a/inc/iSchedule-POST.php +++ b/inc/iSchedule-POST.php @@ -134,13 +134,12 @@ function ischedule_freebusy_request( $ic, $attendees, $attendees_fail) { $fb = get_freebusy( '^'.$attendee->dav_name, $range_start, $range_end ); $fb->AddProperty( 'UID', $ical->GetPValue('UID') ); - $fb->SetProperties( $ic->GetProperties('ORGANIZER'), 'ORGANIZER'); - - foreach( $icalAttendees AS $ia ) { - if ( $ia->Value() == 'mailto:' . $attendee ) { // FIXME: this is probably wrong - $fb->AddProperty( $ia ); - } + $fb->SetProperties( $ical->GetProperties('ORGANIZER'), 'ORGANIZER'); + foreach ( $ical->GetProperties('ATTENDEE') as $at ) { + if ( $at->Value() == 'mailto:' . $attendee->email ) + $fb->AddProperty( $at ); } + $vcal = new vCalendar( array('METHOD' => 'REPLY') ); $vcal->AddComponent( $fb );