merge of '6c60bad69f933684089ae1979a3fe51e84f2c0e5'
and '8c9e590b755c113a30dd211d600f834108d3d3c5' Monotone-Parent: 6c60bad69f933684089ae1979a3fe51e84f2c0e5 Monotone-Parent: 8c9e590b755c113a30dd211d600f834108d3d3c5 Monotone-Revision: c0283461e792310f219134254634aca1351aec58 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2009-11-20T19:02:51 Monotone-Branch: ca.inverse.sogomaint-2.0.2
commit
5f86e04f2f
|
@ -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
|
||||
|
|
|
@ -89,8 +89,7 @@ static NSString *productDirectoryName = @"SOGo";
|
|||
|
||||
[self _addGNUstepSearchPathesToArray: ma];
|
||||
#if COCOA_Foundation_LIBRARY
|
||||
else
|
||||
[self _addCocoaSearchPathesToArray: ma];
|
||||
[self _addCocoaSearchPathesToArray: ma];
|
||||
#endif
|
||||
|
||||
searchPathes = [ma copy];
|
||||
|
@ -108,7 +107,7 @@ static NSString *productDirectoryName = @"SOGo";
|
|||
SoProductRegistry *registry = nil;
|
||||
NSFileManager *fm;
|
||||
NSEnumerator *pathes;
|
||||
NSString *lpath, *bpath, *extension;
|
||||
NSString *lpath, *bpath;
|
||||
NSEnumerator *productNames;
|
||||
NSString *productName;
|
||||
|
||||
|
@ -123,9 +122,7 @@ static NSString *productDirectoryName = @"SOGo";
|
|||
productNames = [[fm directoryContentsAtPath: lpath] objectEnumerator];
|
||||
while ((productName = [productNames nextObject]))
|
||||
{
|
||||
extension = [productName pathExtension];
|
||||
if ([extension length] > 0
|
||||
&& [extension isEqualToString: @"SOGo"])
|
||||
if ([[productName pathExtension] isEqualToString: @"SOGo"])
|
||||
{
|
||||
bpath = [lpath stringByAppendingPathComponent: productName];
|
||||
[self logWithFormat: @" register SOGo product: %@",
|
||||
|
|
27
Main/sogod.m
27
Main/sogod.m
|
@ -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"];
|
||||
|
|
Loading…
Reference in New Issue