Monotone-Parent: 6e1829513cdcf98135e56f857438e77218ae7851
Monotone-Revision: ef58e70b7d00dc34a5d02557365841c574086751 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2009-03-20T17:35:49 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
parent
273415b671
commit
0ca3d9d7b0
|
@ -1,3 +1,10 @@
|
|||
2009-03-20 Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||
|
||||
* SoObjects/SOGo/SOGoUser.m ([SOGoUser -userDefaults]): ensure the
|
||||
values are not nil before putting them in the cache. This fixes an
|
||||
exception occuring for setting a nil key in a dictionary.
|
||||
([SOGoUser -userSettings]): same as above.
|
||||
|
||||
2009-03-19 Francis Lachapelle <flachapelle@inverse.ca>
|
||||
|
||||
* UI/Scheduler/UIxCalListingActions.m ([UIxCalListingActions
|
||||
|
|
|
@ -451,15 +451,16 @@ _timeValue (NSString *key)
|
|||
- (NSUserDefaults *) userDefaults
|
||||
{
|
||||
SOGoUserDefaults *defaults;
|
||||
NSDictionary *values;
|
||||
NSMutableDictionary *d;
|
||||
|
||||
defaults = [[SOGoCache sharedCache] userDefaultsForLogin: login];
|
||||
|
||||
if (!defaults)
|
||||
{
|
||||
NSMutableDictionary *d;
|
||||
|
||||
defaults = [self primaryUserDefaults];
|
||||
|
||||
if (defaults)
|
||||
{
|
||||
// Required parameters for the Web interface
|
||||
if (![[defaults stringForKey: @"ReplyPlacement"] length])
|
||||
[defaults setObject: defaultReplyPlacement forKey: @"ReplyPlacement"];
|
||||
|
@ -473,12 +474,16 @@ _timeValue (NSString *key)
|
|||
// We propagate the loaded user defaults to other sogod instances
|
||||
// which will cache them in SOGoCache (including for the instance
|
||||
// that actually posts the notification)
|
||||
values = [defaults values];
|
||||
if (values)
|
||||
{
|
||||
d = [NSMutableDictionary dictionary];
|
||||
[d setObject: [defaults values] forKey: @"values"];
|
||||
[d setObject: values forKey: @"values"];
|
||||
[d setObject: login forKey: @"uid"];
|
||||
[d setObject: [SOGoProfileURL absoluteString] forKey: @"url"];
|
||||
|
||||
[[SOGoCache sharedCache] setDefaults: defaults forLogin: login key: @"defaults"];
|
||||
[[SOGoCache sharedCache] setDefaults: defaults
|
||||
forLogin: login key: @"defaults"];
|
||||
|
||||
[[NSDistributedNotificationCenter defaultCenter]
|
||||
postNotificationName: @"SOGoUserDefaultsHaveLoaded"
|
||||
|
@ -486,6 +491,8 @@ _timeValue (NSString *key)
|
|||
userInfo: d
|
||||
deliverImmediately: YES];
|
||||
}
|
||||
}
|
||||
}
|
||||
//else
|
||||
// NSLog(@"User defaults cache hit for %@", login);
|
||||
|
||||
|
@ -495,6 +502,7 @@ _timeValue (NSString *key)
|
|||
- (NSUserDefaults *) userSettings
|
||||
{
|
||||
SOGoUserDefaults *settings;
|
||||
NSDictionary *values;
|
||||
|
||||
settings = [[SOGoCache sharedCache] userSettingsForLogin: login];
|
||||
|
||||
|
@ -503,12 +511,17 @@ _timeValue (NSString *key)
|
|||
NSMutableDictionary *d;
|
||||
|
||||
settings = [self primaryUserSettings];
|
||||
if (settings)
|
||||
{
|
||||
[settings fetchProfile];
|
||||
values = [settings values];
|
||||
if (values)
|
||||
{
|
||||
// We propagate the loaded user settings to other sogod instances
|
||||
// which will cache them in SOGoCache (including for the instance
|
||||
// that actually posts the notification)
|
||||
d = [NSMutableDictionary dictionary];
|
||||
[d setObject: [settings values] forKey: @"values"];
|
||||
[d setObject: values forKey: @"values"];
|
||||
[d setObject: login forKey: @"uid"];
|
||||
[d setObject: [SOGoProfileURL absoluteString] forKey: @"url"];
|
||||
|
||||
|
@ -520,6 +533,8 @@ _timeValue (NSString *key)
|
|||
userInfo: d
|
||||
deliverImmediately: YES];
|
||||
}
|
||||
}
|
||||
}
|
||||
//else
|
||||
// NSLog(@"User settings cache hit for %@", login);
|
||||
|
||||
|
|
Loading…
Reference in a new issue