merge of '068bbe8f960b1a20f29054e83e54a57c4372a98e'

and '631e9fa8454aae26e4c7eaa71bfe9e18c0f4b7e5'

Monotone-Parent: 068bbe8f960b1a20f29054e83e54a57c4372a98e
Monotone-Parent: 631e9fa8454aae26e4c7eaa71bfe9e18c0f4b7e5
Monotone-Revision: 95a335681530001430a12707d05dbed7839214fb

Monotone-Author: flachapelle@inverse.ca
Monotone-Date: 2012-07-20T20:03:48
This commit is contained in:
Francis Lachapelle 2012-07-20 20:03:48 +00:00
commit 1d26a4b725
3 changed files with 28 additions and 7 deletions

View file

@ -1,3 +1,16 @@
2012-07-20 Ludovic Marcotte <lmarcotte@inverse.ca>
* UI/MailPartViewers/UIxMailRenderingContext.m
(_shouldDisplayAsAttachment:): refactored to consider
the "bodyId" parameter only for non text/* parts.
2012-07-20 Wolfgang Sourdeau <wsourdeau@inverse.ca>
* 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 <flachapelle@inverse.ca>
* UI/WebServerResources/MailerUI.js (onEmailTo): append the email

View file

@ -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)
{

View file

@ -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];