diff --git a/ChangeLog b/ChangeLog index 68b6b8db2..44da7f3a1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2012-04-19 Wolfgang Sourdeau + * SoObjects/SOGo/SOGoParentFolder.m (-appendSubscribedSources): + ensure the array set as values in the settings dicts are not nil + prior to setting them. + * SoObjects/Appointments/SOGoAppointmentFolder.m (-fetchFields:from:to:title:component:additionalFilters:includeProtectedInformation:): fix the date condition for cycle record, by using c_cycleenddate diff --git a/SoObjects/SOGo/SOGoParentFolder.m b/SoObjects/SOGo/SOGoParentFolder.m index 6aa82224b..b3cbaa29c 100644 --- a/SoObjects/SOGo/SOGoParentFolder.m +++ b/SoObjects/SOGo/SOGoParentFolder.m @@ -293,11 +293,10 @@ static SoSecurityManager *sm = nil; subscribedReferences = [NSMutableArray arrayWithArray: [[settings objectForKey: nameInContainer] objectForKey: @"SubscribedFolders"]]; o = [[settings objectForKey: nameInContainer] objectForKey: @"FolderDisplayNames"]; - folderDisplayNames = nil; - if (o) folderDisplayNames = [NSMutableDictionary dictionaryWithDictionary: o]; - + else + folderDisplayNames = nil; allKeys = [subscribedReferences objectEnumerator]; while ((currentKey = [allKeys nextObject])) @@ -315,12 +314,12 @@ static SoSecurityManager *sm = nil; // If we changed the folder subscribtion list, we must sync it if (dirty) { - id o; - - [[settings objectForKey: nameInContainer] setObject: subscribedReferences - forKey: @"SubscribedFolders"]; - [[settings objectForKey: nameInContainer] setObject: folderDisplayNames - forKey: @"FolderDisplayNames"]; + if (subscribedReferences) + [[settings objectForKey: nameInContainer] setObject: subscribedReferences + forKey: @"SubscribedFolders"]; + if (folderDisplayNames) + [[settings objectForKey: nameInContainer] setObject: folderDisplayNames + forKey: @"FolderDisplayNames"]; } return error;