diff --git a/ChangeLog b/ChangeLog index 4b48dc1a9..86637bd88 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2010-01-11 Ludovic Marcotte + + * UI/Contacts/UIxContactFolderActions.m (-importVcardData:): + We now support multiple vCards in the same file during + the import process + 2010-01-08 Ludovic Marcotte * SoObjects/SOGo/LDAPSource.{h,m} - bindFields is now diff --git a/UI/Contacts/UIxContactFolderActions.m b/UI/Contacts/UIxContactFolderActions.m index 94a47e541..c8081fd5c 100644 --- a/UI/Contacts/UIxContactFolderActions.m +++ b/UI/Contacts/UIxContactFolderActions.m @@ -194,13 +194,27 @@ - (int) importVcardData: (NSString *) vcardData { - NGVCard *card; + NSArray *allCards; int rc; rc = 0; - card = [NGVCard parseSingleFromSource: vcardData]; - if ([self importVcard: card]) - rc = 1; + allCards = [NGVCard parseFromSource: vcardData]; + + if (allCards && [allCards count]) + { + int i; + + for (i = 0; i < [allCards count]; i++) + { + if (![self importVcard: [allCards objectAtIndex: i]]) + { + rc = 0; + break; + } + else + rc++; + } + } return rc; }