Monotone-Parent: db65c7e35ae83bc91fdec247c1d3eba6847752da

Monotone-Revision: 8c9e590b755c113a30dd211d600f834108d3d3c5

Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2009-11-20T19:02:39
Monotone-Branch: ca.inverse.sogo
This commit is contained in:
Wolfgang Sourdeau
2009-11-20 19:02:39 +00:00
parent c8e8c4dff0
commit ef483a59ea
2 changed files with 17 additions and 15 deletions

View File

@@ -1,5 +1,10 @@
2009-11-20 Wolfgang Sourdeau <wsourdeau@inverse.ca>
* Main/sogod.m (prepareUserDefaults): replaces
"convertOldSOGoDomain", automatically set WOMessageUseUTF8,
WOParsersUseUTF8 and NGUseUTF8AsURLEncoding to YES in the user
defaults.
* SoObjects/SOGo/SOGoUserDefaults.m (_sqlJsonRepresentation:): the
escaping of "\\" was done in the wrong direction.
(-storeJSONProfileInDB:): we commit the transaction to avoid a

View File

@@ -56,8 +56,9 @@ BootstrapNSUserDefaults ()
}
static void
convertOldSOGoDomain (NSUserDefaults *ud)
prepareUserDefaults (NSUserDefaults *ud)
{
NSString *redirectURL;
NSDictionary *domain;
domain = [ud persistentDomainForName: @"sogod"];
@@ -72,12 +73,20 @@ convertOldSOGoDomain (NSUserDefaults *ud)
[ud synchronize];
}
}
redirectURL = [ud stringForKey: @"WOApplicationRedirectURL"];
if ([redirectURL hasSuffix: @"/"])
[ud setObject: [redirectURL substringToIndex: [redirectURL length] - 1]
forKey: @"WOApplicationRedirectURL"];
[ud setBool: YES forKey: @"WOMessageUseUTF8"];
[ud setBool: YES forKey: @"WOParsersUseUTF8"];
[ud setBool: YES forKey: @"NGUseUTF8AsURLEncoding"];
}
int
main (int argc, char **argv, char **env)
{
NSString *tzName, *redirectURL;
NSString *tzName;
NSUserDefaults *ud;
NSAutoreleasePool *pool;
int rc;
@@ -90,20 +99,8 @@ main (int argc, char **argv, char **env)
if (getuid() > 0)
{
#if LIB_FOUNDATION_LIBRARY
[NSProcessInfo initializeWithArguments: argv
count: argc environment: env];
#endif
ud = [NSUserDefaults standardUserDefaults];
convertOldSOGoDomain (ud);
redirectURL = [ud stringForKey: @"WOApplicationRedirectURL"];
if (redirectURL && [redirectURL hasSuffix: @"/"])
{
[ud setObject: [redirectURL substringToIndex: [redirectURL length] - 1]
forKey: @"WOApplicationRedirectURL"];
[ud synchronize];
}
prepareUserDefaults (ud);
rc = 0;
tzName = [ud stringForKey: @"SOGoServerTimeZone"];