diff --git a/SoObjects/Appointments/SOGoAppointmentFolder.m b/SoObjects/Appointments/SOGoAppointmentFolder.m index c547af4c6..0e59a6361 100644 --- a/SoObjects/Appointments/SOGoAppointmentFolder.m +++ b/SoObjects/Appointments/SOGoAppointmentFolder.m @@ -1238,11 +1238,24 @@ firstInstanceCalendarDateRange: (NGCalendarDateRange *) fir // contains ONLY one or more vevent with recurrence-id set for each of them. This can happen if // an organizer invites an attendee only to one or many occurences of a repetitive event. iCalCalendar *c; + NSDictionary *record; c = [iCalCalendar parseSingleFromSource: [theRecord objectForKey: @"c_content"]]; - [theRecords addObjectsFromArray: [self _fixupRecords: [c quickRecordsFromContent: [theRecord objectForKey: @"c_content"] - container: nil - nameInContainer: [theRecord objectForKey: @"c_name"]]]]; + components = [self _fixupRecords: + [c quickRecordsFromContent: [theRecord objectForKey: @"c_content"] + container: nil + nameInContainer: [theRecord objectForKey: @"c_name"]]]; + max = [components count]; + for (count = 0; count < max; count++) + { + record = [components objectAtIndex: count]; + oneRange = [NGCalendarDateRange calendarDateRangeWithStartDate: [record objectForKey: @"startDate"] + endDate: [record objectForKey: @"endDate"]]; + if ([theRange doesIntersectWithDateRange: oneRange]) + { + [theRecords addObject: record]; + } + } return; } diff --git a/SoObjects/Appointments/iCalCalendar+SOGo.h b/SoObjects/Appointments/iCalCalendar+SOGo.h index 2768ea892..542f7550a 100644 --- a/SoObjects/Appointments/iCalCalendar+SOGo.h +++ b/SoObjects/Appointments/iCalCalendar+SOGo.h @@ -31,6 +31,9 @@ - (iCalEvent *) eventWithRecurrenceID: (NSString *) recID; - (iCalToDo *) todoWithRecurrenceID: (NSString *) recID; +- (NSArray *) quickRecordsFromContent: (NSString *) theContent + container: (id) theContainer + nameInContainer: (NSString *) nameInContainer; @end