* SoObjects/Mailer/SOGoMailForward.m (from, to, cc, reply-to):
mailHeaders returns an array if there are multiple headers of the same type. Handle this case to correctly show multiple from, to, cc and reply-to headers in mail replies/forwards instead of crashing. Monotone-Parent: dac25405c6ab2f1d735ddb9f6db4243e5e96d14b Monotone-Revision: 29aefdeb26834742b8cd9f01120573b4dcbcc7ed Monotone-Author: jraby@inverse.ca Monotone-Date: 2012-07-12T16:47:23maint-2.0.2
parent
825686eaed
commit
ef848303a3
|
@ -1,6 +1,13 @@
|
|||
2012-07-12 Jean Raby <jraby@inverse.ca>
|
||||
|
||||
* SoObjects/Mailer/SOGoMailForward.m (from, to, cc, reply-to):
|
||||
mailHeaders returns an array if there are multiple headers of the same type.
|
||||
Handle this case to correctly show multiple from, to, cc and reply-to headers
|
||||
in mail replies/forwards instead of crashing.
|
||||
|
||||
2012-07-11 Ludovic Marcotte <lmarcotte@inverse.ca>
|
||||
|
||||
* Finished the implementation and testing of the two
|
||||
* Finished the implementation and testing of the two
|
||||
new defaults. Also added documentation in the SOGo Installation
|
||||
and Configuration Guide.
|
||||
|
||||
|
|
2
NEWS
2
NEWS
|
@ -12,7 +12,7 @@ Enhancements
|
|||
limited to one additional address)
|
||||
|
||||
Bug Fixes
|
||||
-
|
||||
- Fixed a crash when multiple mail header of the same type were encountered.
|
||||
|
||||
1.3.16 (2012-06-07)
|
||||
-------------------
|
||||
|
|
|
@ -89,13 +89,13 @@
|
|||
|
||||
- (NSString *) from
|
||||
{
|
||||
NSString *rc;
|
||||
id rc;
|
||||
|
||||
rc = [[sourceMail mailHeaders] objectForKey: @"from"];
|
||||
if ([rc isKindOfClass: [NSArray class]])
|
||||
rc = [rc componentsJoinedByString: @", "];
|
||||
if (htmlComposition)
|
||||
rc = [[[sourceMail mailHeaders] objectForKey: @"from"]
|
||||
stringByEscapingHTMLString];
|
||||
else
|
||||
rc = [[sourceMail mailHeaders] objectForKey: @"from"];
|
||||
rc = [rc stringByEscapingHTMLString];
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
@ -119,13 +119,16 @@
|
|||
|
||||
- (NSString *) replyTo
|
||||
{
|
||||
NSString *rc;
|
||||
id rc;
|
||||
|
||||
rc = [self _headerField: @"reply-to"];
|
||||
if ([rc isKindOfClass: [NSArray class]])
|
||||
rc = [rc componentsJoinedByString: @", "];
|
||||
if (htmlComposition)
|
||||
rc = [NSString stringWithFormat: @"%@<br/>",
|
||||
[[self _headerField: @"reply-to"] stringByEscapingHTMLString]];
|
||||
[rc stringByEscapingHTMLString]];
|
||||
else
|
||||
rc = ([NSString stringWithFormat: @"%@\n", [self _headerField: @"reply-to"]]);
|
||||
rc = ([NSString stringWithFormat: @"%@\n", rc]);
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
@ -149,12 +152,13 @@
|
|||
|
||||
- (NSString *) to
|
||||
{
|
||||
NSString *rc;
|
||||
id rc;
|
||||
|
||||
rc = [self _headerField: @"to"];
|
||||
if ([rc isKindOfClass: [NSArray class]])
|
||||
rc = [rc componentsJoinedByString: @", "];
|
||||
if (htmlComposition)
|
||||
rc = [[[sourceMail mailHeaders] objectForKey: @"to"] stringByEscapingHTMLString];
|
||||
else
|
||||
rc = [[sourceMail mailHeaders] objectForKey: @"to"];
|
||||
rc = [rc stringByEscapingHTMLString];
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
@ -166,13 +170,17 @@
|
|||
|
||||
- (NSString *) cc
|
||||
{
|
||||
NSString *rc;
|
||||
id *rc;
|
||||
|
||||
rc = [self _headerField: @"cc"];
|
||||
if ([rc isKindOfClass: [NSArray class]])
|
||||
rc = [rc componentsJoinedByString: @", "];
|
||||
|
||||
if (htmlComposition)
|
||||
rc = [NSString stringWithFormat: @"%@<br/>",
|
||||
[[self _headerField: @"cc"] stringByEscapingHTMLString]];
|
||||
[rc stringByEscapingHTMLString]];
|
||||
else
|
||||
rc = ([NSString stringWithFormat: @"%@\n", [self _headerField: @"cc"]]);
|
||||
rc = [NSString stringWithFormat: @"%@\n", rc];
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue