diff --git a/SoObjects/Contacts/SOGoContactFolders.h b/SoObjects/Contacts/SOGoContactFolders.h index 820efb92d..1b685c85b 100644 --- a/SoObjects/Contacts/SOGoContactFolders.h +++ b/SoObjects/Contacts/SOGoContactFolders.h @@ -1,8 +1,6 @@ /* SOGoContactFolders.h - this file is part of SOGo * - * Copyright (C) 2006, 2007 Inverse inc. - * - * Author: Wolfgang Sourdeau + * Copyright (C) 2006-2013 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 +29,8 @@ withDisplayName: (NSString *) newDisplayName; - (NSException *) removeLDAPAddressBook: (NSString *) sourceID; +- (NSDictionary *) systemSources; + @end #endif /* SOGOCONTACTFOLDERS_H */ diff --git a/SoObjects/Contacts/SOGoContactFolders.m b/SoObjects/Contacts/SOGoContactFolders.m index 5bf9ba7bd..3c3e938f0 100644 --- a/SoObjects/Contacts/SOGoContactFolders.m +++ b/SoObjects/Contacts/SOGoContactFolders.m @@ -110,8 +110,9 @@ return result; } -- (NSException *) appendSystemSources +- (NSDictionary *) systemSources { + NSMutableDictionary *systemSources; SOGoUserManager *um; SOGoSystemDefaults *sd; NSEnumerator *sourceIDs, *domains; @@ -119,6 +120,8 @@ SOGoContactSourceFolder *currentFolder; SOGoUser *currentUser; + systemSources = [NSMutableDictionary dictionary]; + if (! ([[context request] isIPhoneAddressBookApp] && ![[context request] isAndroid])) { @@ -143,13 +146,20 @@ andDisplayName: srcDisplayName inContainer: self]; [currentFolder setSource: [um sourceWithID: currentSourceID]]; - [subFolders setObject: currentFolder forKey: currentSourceID]; + [systemSources setObject: currentFolder forKey: currentSourceID]; } domain = [domains nextObject]; } } } + return systemSources; +} + +- (NSException *) appendSystemSources +{ + [subFolders addEntriesFromDictionary: [self systemSources]]; + return nil; } diff --git a/SoObjects/Contacts/SOGoContactGCSEntry.m b/SoObjects/Contacts/SOGoContactGCSEntry.m index 436cb92c4..6e3365d4e 100644 --- a/SoObjects/Contacts/SOGoContactGCSEntry.m +++ b/SoObjects/Contacts/SOGoContactGCSEntry.m @@ -1,8 +1,6 @@ /* SOGoContactGCSEntry.h - this file is part of SOGo * - * Copyright (C) 2006-2012 Inverse inc. - * - * Author: Wolfgang Sourdeau + * Copyright (C) 2006-2014 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 @@ -159,6 +157,12 @@ return result; } +- (NSException *) saveComponent: (NGVCard *) newCard +{ + ASSIGN(card, newCard); + return [self save]; +} + - (NSException *) saveContentString: (NSString *) newContent baseVersion: (unsigned int) newVersion {