From 8715ec448b54ae261f7eeed7b34ac01033230e7e Mon Sep 17 00:00:00 2001 From: Wolfgang Sourdeau Date: Mon, 23 Mar 2009 19:04:31 +0000 Subject: [PATCH] Monotone-Parent: 93f5621e5282201f7b9a61447d23a396e8f682a4 Monotone-Revision: 1da41bffe0d25476b6f909fd1621c5026cdf59ee Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2009-03-23T19:04:31 Monotone-Branch: ca.inverse.sogo --- ChangeLog | 6 ++++++ SoObjects/SOGo/SOGoGCSFolder.m | 12 +++++++++--- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index e573fb3fc..bc719d828 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2009-03-23 Wolfgang Sourdeau + * SoObjects/SOGo/SOGoGCSFolder.m ([SOGoGCSFolder + -subscribe:reallyDoinTheNamesOf:delegatedUsersfromMailInvitation:isMailInvitationinContext:localContext]): + when the user preferences didn't already contain a key matching + the current module name, the subscriptions would not work. We thus + create one if none exists yet. + * SoObjects/Contacts/SOGoContactFolders.m ([SOGoContactFolders -appendSystemSources]): modified the return type and returns nil, to match the new SOGoParentFolder definition of the method. diff --git a/SoObjects/SOGo/SOGoGCSFolder.m b/SoObjects/SOGo/SOGoGCSFolder.m index 8ae3a117b..2e08717ca 100644 --- a/SoObjects/SOGo/SOGoGCSFolder.m +++ b/SoObjects/SOGo/SOGoGCSFolder.m @@ -621,9 +621,6 @@ static NSArray *childRecordFields = nil; NSUserDefaults *ud; NSMutableDictionary *moduleSettings; - ud = [subscribingUser userSettings]; - moduleSettings = [ud objectForKey: [container nameInContainer]]; - if ([owner isEqualToString: [subscribingUser login]]) { [response setStatus: 403]; @@ -632,6 +629,15 @@ static NSArray *childRecordFields = nil; } else { + ud = [subscribingUser userSettings]; + moduleSettings = [ud objectForKey: [container nameInContainer]]; + if (!(moduleSettings + && [moduleSettings isKindOfClass: [NSMutableDictionary class]])) + { + moduleSettings = [NSMutableDictionary dictionary]; + [ud setObject: moduleSettings forKey: [container nameInContainer]]; + } + folderSubscription = [moduleSettings objectForKey: @"SubscribedFolders"]; if (!(folderSubscription