From 47e6a827ee40c5c946267b9082b056ab96a87cec Mon Sep 17 00:00:00 2001 From: Wolfgang Sourdeau Date: Fri, 14 Aug 2009 12:22:33 +0000 Subject: [PATCH] Monotone-Parent: e000b5c0e80fdd3891b4885ea6b27d82edaf8572 Monotone-Revision: 9755daf6ba583e833c7bab387fc5e777c6272bd1 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2009-08-14T12:22:33 Monotone-Branch: ca.inverse.sogo --- ChangeLog | 7 +++++++ Tools/SOGoToolBackup.m | 10 +++++++--- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 7a6919a8b..92ef8bf9e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2009-08-14 Wolfgang Sourdeau + + * Tools/SOGoToolBackup.m (-extractUserPreferences:intoRecord:): we + must extract the values of the user defaults in order to put them + in the record dictionary. Putting the defaults themselves will + only produce serialized strings. + 2009-08-13 Wolfgang Sourdeau * SoObjects/SOGo/LDAPSource.m: the objectClass are now all added diff --git a/Tools/SOGoToolBackup.m b/Tools/SOGoToolBackup.m index a015e0995..59618ee67 100644 --- a/Tools/SOGoToolBackup.m +++ b/Tools/SOGoToolBackup.m @@ -36,11 +36,13 @@ #import #import #import +#import #import "NSDictionary+SOGoTool.h" #import "SOGoToolBackup.h" /* TODO: + - handle database connectivity errors - respond to "--help backup" - allow more than one user specifier on the command-line */ @@ -328,11 +330,13 @@ { SOGoUser *sogoUser; NSArray *preferences; + NSDictionary *defaultsValues, *settingsValues; sogoUser = [SOGoUser userWithLogin: uid roles: nil]; - preferences = [NSArray arrayWithObjects: - [sogoUser userDefaults], - [sogoUser userSettings], nil]; + defaultsValues = [[sogoUser userDefaults] values]; + settingsValues = [[sogoUser userSettings] values]; + preferences = [NSArray arrayWithObjects: defaultsValues, settingsValues, + nil]; [userRecord setObject: preferences forKey: @"preferences"]; return YES;