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