Revert "Merge pull request #164 from Zentyal/jgarcia/revert-merge-inverse"

This reverts commit 1404dbdb88, reversing
changes made to 72cbd9a45f.
This commit is contained in:
Julio García
2015-08-03 09:48:06 +02:00
parent 0ce04fd4b6
commit 26bd1b30fa
41 changed files with 774 additions and 291 deletions
+25 -14
View File
@@ -1,6 +1,6 @@
/*
Copyright (C) 2004 SKYRIX Software AG
Copyright (C) 2005-2014 Inverse inc.
Copyright (C) 2005-2015 Inverse inc.
This file is part of SOGo.
@@ -138,9 +138,13 @@
if ([email length] > 0)
{
fn = [card fn];
fn = [fn stringByReplacingString: @"\"" withString: @""];
fn = [fn stringByReplacingString: @"'" withString: @"\\\'"];
attrs = [NSString stringWithFormat: @"onclick=\"return openMailTo('%@ <%@>');\"", fn, email];
if ([fn length] > 0)
attrs = [NSString stringWithFormat: @"%@ <%@>", fn, email];
else
attrs = email;
attrs = [attrs stringByReplacingString: @"'" withString: @"\\'"];
attrs = [attrs stringByReplacingString: @"\"" withString: @"\\\""];
attrs = [NSString stringWithFormat: @"onclick=\"return openMailTo('%@');\"", attrs];
}
else
{
@@ -181,16 +185,23 @@
for (i = 0; i < [emails count]; i++)
{
email = [[emails objectAtIndex: i] flattenedValuesForKey: @""];
fn = [card fn];
fn = [fn stringByReplacingString: @"\"" withString: @""];
fn = [fn stringByReplacingString: @"'" withString: @"\\\'"];
attrs = [NSString stringWithFormat: @"onclick=\"return openMailTo('%@ <%@>');\"", fn, email];
[secondaryEmails addObject: [self _cardStringWithLabel: nil
value: email
byEscapingHTMLString: YES
asLinkScheme: @"mailto:"
withLinkAttributes: attrs]];
if ([email length])
{
fn = [card fn];
if ([fn length])
attrs = [NSString stringWithFormat: @"%@ <%@>", fn, email];
else
attrs = email;
attrs = [attrs stringByReplacingString: @"'" withString: @"\\'"];
attrs = [attrs stringByReplacingString: @"\"" withString: @"\\\""];
attrs = [NSString stringWithFormat: @"onclick=\"return openMailTo('%@');\"", attrs];
[secondaryEmails addObject: [self _cardStringWithLabel: nil
value: email
byEscapingHTMLString: YES
asLinkScheme: @"mailto:"
withLinkAttributes: attrs]];
}
}
}
else