mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-10-19 18:18:12 +00:00
fix(eas): additional name fields (fixes #4929)
This commit is contained in:
1 parent
0beb0536a8
commit
cb34fae175
1 file changed
+31
-7
@@ -103,7 +103,16 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||||||
|
|
||||||
if ((o = [n flattenedValueAtIndex: 1 forKey: @""]))
|
if ((o = [n flattenedValueAtIndex: 1 forKey: @""]))
|
||||||
[s appendFormat: @"<FirstName xmlns=\"Contacts:\">%@</FirstName>", [o activeSyncRepresentationInContext: context]];
|
[s appendFormat: @"<FirstName xmlns=\"Contacts:\">%@</FirstName>", [o activeSyncRepresentationInContext: context]];
|
||||||
|
|
||||||
|
if ((o = [n flattenedValueAtIndex: 2 forKey: @""]))
|
||||||
|
[s appendFormat: @"<MiddleName xmlns=\"Contacts:\">%@</MiddleName>", [o activeSyncRepresentationInContext: context]];
|
||||||
|
|
||||||
|
if ((o = [n flattenedValueAtIndex: 3 forKey: @""]))
|
||||||
|
[s appendFormat: @"<Title xmlns=\"Contacts:\">%@</Title>", [o activeSyncRepresentationInContext: context]];
|
||||||
|
|
||||||
|
if ((o = [n flattenedValueAtIndex: 4 forKey: @""]))
|
||||||
|
[s appendFormat: @"<Suffix xmlns=\"Contacts:\">%@</Suffix>", [o activeSyncRepresentationInContext: context]];
|
||||||
|
|
||||||
if ((o = [self workCompany]))
|
if ((o = [self workCompany]))
|
||||||
[s appendFormat: @"<CompanyName xmlns=\"Contacts:\">%@</CompanyName>", [o activeSyncRepresentationInContext: context]];
|
[s appendFormat: @"<CompanyName xmlns=\"Contacts:\">%@</CompanyName>", [o activeSyncRepresentationInContext: context]];
|
||||||
|
|
||||||
@@ -306,8 +315,10 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||||||
{
|
{
|
||||||
CardElement *element;
|
CardElement *element;
|
||||||
NSMutableArray *addressLines, *other_addresses;
|
NSMutableArray *addressLines, *other_addresses;
|
||||||
id o;
|
id o, l, m, f, p, s;
|
||||||
|
|
||||||
|
l = m = f = p = s = nil;
|
||||||
|
|
||||||
// Contact's note
|
// Contact's note
|
||||||
if ((o = [[theValues objectForKey: @"Body"] objectForKey: @"Data"]))
|
if ((o = [[theValues objectForKey: @"Body"] objectForKey: @"Data"]))
|
||||||
[self setNote: o];
|
[self setNote: o];
|
||||||
@@ -533,10 +544,23 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||||||
if ((o = [theValues objectForKey: @"FileAs"]) || ![self _isGhosted: @"FileAs" inContext: context])
|
if ((o = [theValues objectForKey: @"FileAs"]) || ![self _isGhosted: @"FileAs" inContext: context])
|
||||||
[self setFn: [theValues objectForKey: @"FileAs"]];
|
[self setFn: [theValues objectForKey: @"FileAs"]];
|
||||||
|
|
||||||
[self setNWithFamily: [theValues objectForKey: @"LastName"]
|
if ((o = [theValues objectForKey: @"LastName"]) || ![self _isGhosted: @"LastName" inContext: context])
|
||||||
given: [theValues objectForKey: @"FirstName"]
|
l = o ? o : @"";
|
||||||
additional: nil prefixes: nil suffixes: nil];
|
|
||||||
|
if ((o = [theValues objectForKey: @"FirstName"]) || ![self _isGhosted: @"FirstName" inContext: context])
|
||||||
|
f = o ? o : @"";
|
||||||
|
|
||||||
|
if ((o = [theValues objectForKey: @"MiddleName"]) || ![self _isGhosted: @"MiddleName" inContext: context])
|
||||||
|
m = o ? o : @"";
|
||||||
|
|
||||||
|
if ((o = [theValues objectForKey: @"Title"]) || ![self _isGhosted: @"Title" inContext: context])
|
||||||
|
p = o ? o : @"";
|
||||||
|
|
||||||
|
if ((o = [theValues objectForKey: @"Suffix"]) || ![self _isGhosted: @"Suffix" inContext: context])
|
||||||
|
s = o ? o : @"";
|
||||||
|
|
||||||
|
[self setNWithFamily: l given: f additional: m prefixes: p suffixes: s];
|
||||||
|
|
||||||
// IM information
|
// IM information
|
||||||
if ((o = [theValues objectForKey: @"IMAddress"]) || ![self _isGhosted: @"IMAddress" inContext: context])
|
if ((o = [theValues objectForKey: @"IMAddress"]) || ![self _isGhosted: @"IMAddress" inContext: context])
|
||||||
[[self uniqueChildWithTag: @"x-aim"]
|
[[self uniqueChildWithTag: @"x-aim"]
|
||||||
|
|||||||
Reference in new issue
Block a user