diff --git a/SoObjects/Contacts/NGVCard+SOGo.h b/SoObjects/Contacts/NGVCard+SOGo.h index 512037888..87b612eae 100644 --- a/SoObjects/Contacts/NGVCard+SOGo.h +++ b/SoObjects/Contacts/NGVCard+SOGo.h @@ -1,6 +1,6 @@ /* NGVCard+SOGo.h - this file is part of SOGo * - * Copyright (C) 2009-2014 Inverse inc. + * Copyright (C) 2009-2015 Inverse inc. * * This file is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -31,6 +31,10 @@ - (CardElement *) elementWithTag: (NSString *) elementTag ofType: (NSString *) type; +- (void) addElementWithTag: (NSString *) elementTag + ofType: (NSString *) type + withValue: (id) value; + - (void) updateFromLDIFRecord: (NSDictionary *) ldifRecord; - (NSMutableDictionary *) asLDIFRecord; diff --git a/SoObjects/Contacts/NGVCard+SOGo.m b/SoObjects/Contacts/NGVCard+SOGo.m index 1fd704df5..19c5d9084 100644 --- a/SoObjects/Contacts/NGVCard+SOGo.m +++ b/SoObjects/Contacts/NGVCard+SOGo.m @@ -188,8 +188,8 @@ convention: } - (void) addElementWithTag: (NSString *) elementTag - ofType: (NSString *) type - withValue: (id) value + ofType: (NSString *) type + withValue: (id) value { NSArray *allValues; NSEnumerator *list; diff --git a/UI/Contacts/UIxContactEditor.m b/UI/Contacts/UIxContactEditor.m index d2c0df009..001a5d68e 100644 --- a/UI/Contacts/UIxContactEditor.m +++ b/UI/Contacts/UIxContactEditor.m @@ -430,8 +430,9 @@ static Class SOGoContactGCSEntryK = Nil; { if ([attrs isKindOfClass: [NSDictionary class]]) { - element = [card elementWithTag: @"tel" ofType: [attrs objectForKey: @"type"]]; - [element setSingleValue: [attrs objectForKey: @"value"] forKey: @""]; + [card addElementWithTag: @"tel" + ofType: [attrs objectForKey: @"type"] + withValue: [attrs objectForKey: @"value"]]; } } } @@ -448,8 +449,9 @@ static Class SOGoContactGCSEntryK = Nil; { if ([o isKindOfClass: [NSDictionary class]]) { - element = [card elementWithTag: @"email" ofType: [o objectForKey: @"type"]]; - [element setSingleValue: [o objectForKey: @"value"] forKey: @""]; + [card addElementWithTag: @"email" + ofType: [o objectForKey: @"type"] + withValue: [o objectForKey: @"value"]]; } } } @@ -466,8 +468,9 @@ static Class SOGoContactGCSEntryK = Nil; { if ([attrs isKindOfClass: [NSDictionary class]]) { - element = [card elementWithTag: @"url" ofType: [attrs objectForKey: @"type"]]; - [element setSingleValue: [attrs objectForKey: @"value"] forKey: @""]; + [card addElementWithTag: @"url" + ofType: [attrs objectForKey: @"type"] + withValue: [attrs objectForKey: @"value"]]; } } }