diff --git a/ChangeLog b/ChangeLog index 6d86d528a..adc1680ce 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,12 @@ 2007-05-11 Wolfgang Sourdeau + * SoObjects/SOGo/AgenorUserDefaults.m ([AgenorUserDefaults + -primaryFetchProfile]): when building with libFoundation, don't + use the "propertyList" method from NSString. Rather, we convert + the string to an NSData instance and passit as parameter to + NSDeserializer. This way, we obtain a mutable dictionary rather + than an immutable one. + * SoObjects/Mailer/SOGoDraftObject.m ([SOGoDraftObject -bodyPartForText]) ([SOGoDraftObject -mimeMessageForContentWithHeaderMap:]): use the constant string "contentTypeValue". diff --git a/SoObjects/SOGo/AgenorUserDefaults.m b/SoObjects/SOGo/AgenorUserDefaults.m index e7031c7c7..d904acbc0 100644 --- a/SoObjects/SOGo/AgenorUserDefaults.m +++ b/SoObjects/SOGo/AgenorUserDefaults.m @@ -109,6 +109,9 @@ static NSString *uidColumnName = @"uid"; NSString *sql, *value; NSArray *attrs; BOOL rc; +#if LIB_FOUNDATION_LIBRARY + NSData *plistData; +#endif rc = NO; @@ -144,7 +147,17 @@ static NSString *uidColumnName = @"uid"; /* remember values */ value = [row objectForKey: fieldName]; if ([value isNotNull]) - [values setDictionary: [value propertyList]]; + { +#if LIB_FOUNDATION_LIBRARY + plistData = [value dataUsingEncoding: NSUTF8StringEncoding]; + [values setDictionary: [NSDeserializer + deserializePropertyListFromData: plistData + mutableContainers: YES]]; + +#else + [values setDictionary: [value propertyList]]; +#endif + } ASSIGN (lastFetch, [NSCalendarDate date]); defFlags.modified = NO;