Monotone-Parent: f0283ca70db031586d1105d8d042333fb67911d2

Monotone-Revision: 37e598aeb2b79c619bb99d9295a63f9ad757d3c7

Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2011-04-05T15:11:34
Monotone-Branch: ca.inverse.sogo
maint-2.0.2
Wolfgang Sourdeau 2011-04-05 15:11:34 +00:00
parent 9f48d79d20
commit 32f139a710
3 changed files with 24 additions and 24 deletions

View File

@ -855,9 +855,6 @@ firstInstanceCalendarDateRange: (NGCalendarDateRange *) fir
iCalTimeZone *eventTimeZone; iCalTimeZone *eventTimeZone;
unsigned count, max, offset; unsigned count, max, offset;
records = [NSMutableArray array];
ranges = nil;
content = [theRecord objectForKey: @"c_cycleinfo"]; content = [theRecord objectForKey: @"c_cycleinfo"];
if (![content isNotNull]) if (![content isNotNull])
{ {
@ -933,35 +930,35 @@ firstInstanceCalendarDateRange: (NGCalendarDateRange *) fir
} }
// Calculate the occurrences for the given range // Calculate the occurrences for the given range
records = [NSMutableArray array];
ranges = [iCalRecurrenceCalculator recurrenceRangesWithinCalendarDateRange: recurrenceRange ranges = [iCalRecurrenceCalculator recurrenceRangesWithinCalendarDateRange: recurrenceRange
firstInstanceCalendarDateRange: firstRange firstInstanceCalendarDateRange: firstRange
recurrenceRules: rules recurrenceRules: rules
exceptionRules: exRules exceptionRules: exRules
exceptionDates: exDates]; exceptionDates: exDates];
max = [ranges count];
for (count = 0; count < max; count++)
{
oneRange = [ranges objectAtIndex: count];
fixedRow = [self fixupCycleRecord: row
cycleRange: oneRange
firstInstanceCalendarDateRange: firstRange
withEventTimeZone: eventTimeZone];
if (fixedRow)
[records addObject: fixedRow];
}
[self _appendCycleExceptionsFromRow: row
firstInstanceCalendarDateRange: firstRange
forRange: theRange
toArray: records];
[theRecords addObjectsFromArray: records];
} }
} }
} }
else else
[self errorWithFormat:@"cyclic record doesn't have content -> %@", theRecord]; [self errorWithFormat:@"cyclic record doesn't have content -> %@", theRecord];
max = [ranges count];
for (count = 0; count < max; count++)
{
oneRange = [ranges objectAtIndex: count];
fixedRow = [self fixupCycleRecord: row
cycleRange: oneRange
firstInstanceCalendarDateRange: firstRange
withEventTimeZone: eventTimeZone];
if (fixedRow)
[records addObject: fixedRow];
}
[self _appendCycleExceptionsFromRow: row
firstInstanceCalendarDateRange: firstRange
forRange: theRange
toArray: records];
[theRecords addObjectsFromArray: records];
} }
- (NSArray *) _flattenCycleRecords: (NSArray *) _records - (NSArray *) _flattenCycleRecords: (NSArray *) _records

View File

@ -139,8 +139,10 @@ static SoSecurityManager *sm = nil;
SOGoWebAppointmentFolder *webCalendar; SOGoWebAppointmentFolder *webCalendar;
NSString *name; NSString *name;
if (![self newFolderWithName: folderDisplayName if ([self newFolderWithName: folderDisplayName
nameInContainer: &name]) nameInContainer: &name])
webCalendar = nil;
else
{ {
aptFolder = [subFolders objectForKey: name]; aptFolder = [subFolders objectForKey: name];
[aptFolder setFolderPropertyValue: url [aptFolder setFolderPropertyValue: url

View File

@ -211,6 +211,8 @@
iCalEntityObject *entity, *testEntity; iCalEntityObject *entity, *testEntity;
int count, max, testRecIdSecs; int count, max, testRecIdSecs;
entity = nil;
entities = [calendar events]; entities = [calendar events];
max = [entities count]; max = [entities count];
if (max == 0) if (max == 0)
@ -221,7 +223,6 @@
if (max > 0) if (max > 0)
{ {
entity = nil;
for (count = 0; !entity && count < max; count++) for (count = 0; !entity && count < max; count++)
{ {
testEntity = [entities objectAtIndex: count]; testEntity = [entities objectAtIndex: count];