From e40cd602f7bed232872f7714cf3ededa4c2c8d70 Mon Sep 17 00:00:00 2001 From: Wolfgang Sourdeau Date: Thu, 12 Aug 2010 13:18:35 +0000 Subject: [PATCH] Monotone-Parent: ccda1427d14d0786cfb28dbb253a43ab22a93a2e Monotone-Revision: c46d8b7dd8119925eededd812de04ae71f5c1d6d Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2010-08-12T13:18:35 Monotone-Branch: ca.inverse.sogo --- ChangeLog | 7 +++++++ SoObjects/Contacts/SOGoContactFolders.m | 13 +++++++++++++ 2 files changed, 20 insertions(+) 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