diff --git a/SOPE/NGCards/ChangeLog b/SOPE/NGCards/ChangeLog index 8d3b0d28e..c785debc9 100644 --- a/SOPE/NGCards/ChangeLog +++ b/SOPE/NGCards/ChangeLog @@ -1,5 +1,9 @@ 2011-07-11 Francis Lachapelle + * iCalDailyRecurrenceCalculator.m + (-recurrenceRangesWithinCalendarDateRange:): we must return all + ranges that intersect with the lookup period. + * iCalRepeatableEntityObject.m (-addToExceptionDates:): drop the time part when dealing with an all-day event. diff --git a/SOPE/NGCards/iCalDailyRecurrenceCalculator.m b/SOPE/NGCards/iCalDailyRecurrenceCalculator.m index ee8c2b6f6..728d0dec2 100644 --- a/SOPE/NGCards/iCalDailyRecurrenceCalculator.m +++ b/SOPE/NGCards/iCalDailyRecurrenceCalculator.m @@ -160,9 +160,8 @@ { currentEndDate = [currentStartDate addTimeInterval: [firstRange duration]]; r = [NGCalendarDateRange calendarDateRangeWithStartDate: currentStartDate - endDate: currentEndDate]; - - if ([_r containsDateRange: r]) + endDate: currentEndDate]; + if ([_r containsDateRange: r] || [_r doesIntersectWithDateRange: r]) [ranges addObject: r]; } } @@ -178,6 +177,7 @@ i++; } + return ranges; } diff --git a/SoObjects/Mailer/SOGoDraftObject.m b/SoObjects/Mailer/SOGoDraftObject.m index b2804c824..1d11305b7 100644 --- a/SoObjects/Mailer/SOGoDraftObject.m +++ b/SoObjects/Mailer/SOGoDraftObject.m @@ -981,9 +981,6 @@ static NSString *userAgent = nil; */ NGMutableHashMap *map; NGMimeBodyPart *bodyPart; - SOGoUserDefaults *ud; - - ud = [[context activeUser] userDefaults]; /* prepare header of body part */ @@ -1014,12 +1011,9 @@ static NSString *userAgent = nil; - (NGMimeMessage *) mimeMessageForContentWithHeaderMap: (NGMutableHashMap *) map { NGMimeMessage *message; - SOGoUserDefaults *ud; // BOOL addSuffix; id body; - ud = [[context activeUser] userDefaults]; - [map setObject: @"text/plain" forKey: @"content-type"]; body = text; if (body) diff --git a/SoObjects/Mailer/SOGoDraftsFolder.m b/SoObjects/Mailer/SOGoDraftsFolder.m index 140f4605e..fa43f6960 100644 --- a/SoObjects/Mailer/SOGoDraftsFolder.m +++ b/SoObjects/Mailer/SOGoDraftsFolder.m @@ -37,7 +37,7 @@ static unsigned int newCount; - (NSString *) generateNameForNewDraft { - NSString *newName, *login; + NSString *newName; unsigned int currentTime; currentTime = [[NSDate date] timeIntervalSince1970]; @@ -49,7 +49,6 @@ static unsigned int newCount; newCount = 1; } - login = [[context activeUser] login]; newName = [NSString stringWithFormat: @"newDraft%u-%u", currentTime, newCount]; diff --git a/SoObjects/Mailer/SOGoMailAccount.m b/SoObjects/Mailer/SOGoMailAccount.m index 1e795f74f..e733e3953 100644 --- a/SoObjects/Mailer/SOGoMailAccount.m +++ b/SoObjects/Mailer/SOGoMailAccount.m @@ -121,13 +121,6 @@ static NSString *inboxFolderName = @"INBOX"; NSArray *namespace; NGImap4Client *client; - SOGoUser *user; - NSArray *accounts; - NSDictionary *account; - - user = [SOGoUser userWithLogin: [self ownerInContext: nil]]; - accounts = [user mailAccounts]; - account = [accounts objectAtIndex: [nameInContainer intValue]]; client = [[self imap4Connection] client]; namespaceDict = [client namespace]; @@ -285,10 +278,9 @@ static NSString *inboxFolderName = @"INBOX"; manager = [SOGoSieveManager sieveManagerForUser: [context activeUser]]; return [manager updateFiltersForLogin: [[self imap4URL] user] - authname: [[self imap4URL] user] - password: [self imap4PasswordRenewed: NO] - account: self]; - + authname: [[self imap4URL] user] + password: [self imap4PasswordRenewed: NO] + account: self]; }