diff --git a/ChangeLog b/ChangeLog index 28ba383a0..684f63fdd 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2010-08-12 Wolfgang Sourdeau + + * SoObjects/Contacts/SOGoContactFolders.m + (-toManyRelationshipKeys): new overriden method to return only the + personal addressbook when the request is performed by + AddressBook.app. + 2010-08-11 Wolfgang Sourdeau * UI/WebServerResources/SchedulerUI.js: (initCalendars): avoid diff --git a/SoObjects/Contacts/SOGoContactFolders.m b/SoObjects/Contacts/SOGoContactFolders.m index 98197dfa6..6c791ba5b 100644 --- a/SoObjects/Contacts/SOGoContactFolders.m +++ b/SoObjects/Contacts/SOGoContactFolders.m @@ -35,6 +35,7 @@ #import #import #import +#import #import "SOGoContactGCSFolder.h" #import "SOGoContactSourceFolder.h" @@ -87,4 +88,16 @@ return [self labelForKey: @"Personal Address Book"]; } +- (NSArray *) toManyRelationshipKeys +{ + NSMutableArray *keys; + + if ([[context request] isAddressBookApp]) + keys = [NSMutableArray arrayWithObject: @"personal"]; + else + keys = (NSMutableArray *) [super toManyRelationshipKeys]; + + return keys; +} + @end