mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-07-15 05:14:53 +00:00
see changelog
Monotone-Parent: 98c12fec2aa59fdb212078c989152e071dfdd714 Monotone-Revision: 7b7bd2c2a5b03397fa881da7976214adc4635a4a Monotone-Author: ludovic@Sophos.ca Monotone-Date: 2007-12-21T16:57:11 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
@@ -105,13 +105,18 @@
|
||||
|
||||
emails = [NSMutableArray new];
|
||||
[emails addObjectsFromArray: [card childrenWithTag: @"email"]];
|
||||
|
||||
[emails removeObjectsInArray: [card childrenWithTag: @"email"
|
||||
andAttribute: @"type"
|
||||
havingValue: @"pref"]];
|
||||
|
||||
if ([emails count] > 1)
|
||||
// We might not have a preferred item but rather something like this:
|
||||
// EMAIL;TYPE=work:dd@ee.com
|
||||
// EMAIL;TYPE=home:ff@gg.com
|
||||
// In this case, we always return the last entry.
|
||||
if ([emails count] > 0)
|
||||
{
|
||||
email = [[emails objectAtIndex: 0] value: 0];
|
||||
email = [[emails objectAtIndex: [emails count]-1] value: 0];
|
||||
mailTo = [NSString stringWithFormat: @"<a href=\"mailto:%@\""
|
||||
@" onclick=\"return onContactMailTo(this);\">"
|
||||
@"%@</a>", email, email];
|
||||
@@ -119,6 +124,8 @@
|
||||
else
|
||||
mailTo = nil;
|
||||
|
||||
[emails release];
|
||||
|
||||
return [self _cardStringWithLabel: @"Additional Email:"
|
||||
value: mailTo];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user