From 6a6982bd89be53f4f715b0e545edf9f33b2fc123 Mon Sep 17 00:00:00 2001 From: Wolfgang Sourdeau Date: Thu, 19 Apr 2012 14:48:07 +0000 Subject: [PATCH] Monotone-Parent: 605af413c10fbef80e5952f773c4450ffface034 Monotone-Revision: 407012b144380da01f4b13cfb23faba545da887a Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2012-04-19T14:48:07 --- ChangeLog | 4 ++++ SoObjects/SOGo/SOGoParentFolder.m | 17 ++++++++--------- 2 files changed, 12 insertions(+), 9 deletions(-) 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;