From f363ddf101a097494ec50f6f1a4f3dfcce61657f Mon Sep 17 00:00:00 2001 From: Ludovic Marcotte Date: Fri, 20 Jul 2012 18:17:06 +0000 Subject: [PATCH 1/3] See ChangeLog Monotone-Parent: 5a6d160e6f9616edb725a40e08f24f0f0bf539b0 Monotone-Revision: 173ccf9cd4cd08cdc361da9d58df641be065e5a5 Monotone-Author: ludovic@Sophos.ca Monotone-Date: 2012-07-20T18:17:06 --- ChangeLog | 6 ++++++ UI/MailPartViewers/UIxMailRenderingContext.m | 17 ++++++++++------- 2 files changed, 16 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index 1907ca606..2cd1afe47 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2012-07-20 Ludovic Marcotte + + * UI/MailPartViewers/UIxMailRenderingContext.m + (_shouldDisplayAsAttachment:): refactored to consider + the "bodyId" parameter only for non text/* parts. + 2012-07-20 Francis Lachapelle * UI/MailPartViewers/UIxMailPartHTMLViewer.m diff --git a/UI/MailPartViewers/UIxMailRenderingContext.m b/UI/MailPartViewers/UIxMailRenderingContext.m index 82113cac3..9b128f8a5 100644 --- a/UI/MailPartViewers/UIxMailRenderingContext.m +++ b/UI/MailPartViewers/UIxMailRenderingContext.m @@ -32,22 +32,25 @@ @interface UIxMailRenderingContext (Private) -- (BOOL) _shouldDisplayAsAttachment: (NSDictionary *) info; - +- (BOOL) _shouldDisplayAsAttachment: (NSDictionary *) info + textPart: (BOOL) textPart; @end @implementation UIxMailRenderingContext (Private) - (BOOL) _shouldDisplayAsAttachment: (NSDictionary *) info + textPart: (BOOL) textPart { NSString *s; BOOL shouldDisplay; s = [[info objectForKey:@"disposition"] objectForKey: @"type"]; - shouldDisplay = ((s && ([s caseInsensitiveCompare: @"ATTACHMENT"] - == NSOrderedSame)) - || [[info objectForKey: @"bodyId"] length]); + shouldDisplay = (s && ([s caseInsensitiveCompare: @"ATTACHMENT"] + == NSOrderedSame)); + + if (!shouldDisplay && !textPart) + shouldDisplay = ([[info objectForKey: @"bodyId"] length] ? YES : NO); return shouldDisplay; } @@ -198,7 +201,7 @@ static BOOL showNamedTextAttachmentsInline = NO; else if ([mt isEqualToString:@"text"]) { if ([st isEqualToString:@"plain"] || [st isEqualToString:@"html"]) { - if (!showNamedTextAttachmentsInline && [self _shouldDisplayAsAttachment: _info]) + if (!showNamedTextAttachmentsInline && [self _shouldDisplayAsAttachment: _info textPart:YES]) return [self linkViewer]; return [st isEqualToString:@"html"] @@ -212,7 +215,7 @@ static BOOL showNamedTextAttachmentsInline = NO; // Tiffs aren't well-supported if ([mt isEqualToString:@"image"] && ![st isEqualToString: @"tiff"]) { - if ([self _shouldDisplayAsAttachment: _info]) + if ([self _shouldDisplayAsAttachment: _info textPart: NO]) return [self linkViewer]; return [self imageViewer]; From 8f31821e1d21a1ba12aca2eb3f081b8b9a72c338 Mon Sep 17 00:00:00 2001 From: Wolfgang Sourdeau Date: Fri, 20 Jul 2012 19:07:03 +0000 Subject: [PATCH 2/3] Monotone-Parent: c9c54e20cc8e010c29ef8e5fa1cbd039c35e5344 Monotone-Revision: 7eb19f1f060daa6cb0a2421481ec351910c3af68 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2012-07-20T19:07:03 --- ChangeLog | 7 +++++++ SoObjects/Appointments/SOGoAppointmentFolder.m | 5 +++++ 2 files changed, 12 insertions(+) diff --git a/ChangeLog b/ChangeLog index 84e07e25c..3ae8b8e02 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2012-07-20 Wolfgang Sourdeau + + * SoObjects/Appointments/SOGoAppointmentFolder.m + (_appendCycleException:firstInstanceCalendarDateRange:fromRow:forRange:withTimeZone:toArray:): + return immediately if the occurrence does not have a valid + recurrence-id. + 2012-07-20 Francis Lachapelle * UI/WebServerResources/MailerUI.js (onEmailTo): append the email diff --git a/SoObjects/Appointments/SOGoAppointmentFolder.m b/SoObjects/Appointments/SOGoAppointmentFolder.m index 29a64b77b..50cdd92f9 100644 --- a/SoObjects/Appointments/SOGoAppointmentFolder.m +++ b/SoObjects/Appointments/SOGoAppointmentFolder.m @@ -863,6 +863,11 @@ firstInstanceCalendarDateRange: (NGCalendarDateRange *) fir newRecord = nil; recurrenceId = [component recurrenceId]; + if (!recurrenceId) + { + [self errorWithFormat: @"ignored component with an empty EXCEPTION-ID"]; + return; + } if (tz) { From d63d4ee19e32596085dcb932d3aeb91bae6f1207 Mon Sep 17 00:00:00 2001 From: Ludovic Marcotte Date: Fri, 20 Jul 2012 18:21:59 +0000 Subject: [PATCH 3/3] Fixed merge Monotone-Parent: a7a764a2e6fd01790136451d2f144d9b934d1e8e Monotone-Revision: 631e9fa8454aae26e4c7eaa71bfe9e18c0f4b7e5 Monotone-Author: ludovic@Sophos.ca Monotone-Date: 2012-07-20T18:21:59 --- ChangeLog | 4 ---- 1 file changed, 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index cb3021d12..d23960f0c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,11 +1,9 @@ -<<<<<<< variant A 2012-07-20 Ludovic Marcotte * UI/MailPartViewers/UIxMailRenderingContext.m (_shouldDisplayAsAttachment:): refactored to consider the "bodyId" parameter only for non text/* parts. ->>>>>>> variant B 2012-07-20 Wolfgang Sourdeau * SoObjects/Appointments/SOGoAppointmentFolder.m @@ -13,8 +11,6 @@ return immediately if the occurrence does not have a valid recurrence-id. -####### Ancestor -======= end 2012-07-20 Francis Lachapelle * UI/WebServerResources/MailerUI.js (onEmailTo): append the email