Fix SOGoLoginModule when set to "Last used"
This commit is contained in:
parent
067934026b
commit
0b99dbfc99
|
@ -356,10 +356,6 @@ static SoProduct *preferencesProduct = nil;
|
||||||
[values setObject: vacation forKey: @"Vacation"];
|
[values setObject: vacation forKey: @"Vacation"];
|
||||||
}
|
}
|
||||||
|
|
||||||
// Don't expose SOGoRememberLastModule;
|
|
||||||
// User can edit SOGoLoginModule but SOGoRememberLastModule is managed internally.
|
|
||||||
[values removeObjectForKey: @"SOGoRememberLastModule"];
|
|
||||||
|
|
||||||
return [self responseWithStatus: 200 andJSONRepresentation: values];
|
return [self responseWithStatus: 200 andJSONRepresentation: values];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2183,6 +2183,7 @@ static NSArray *reminderValues = nil;
|
||||||
NSArray *allKeys, *accounts;
|
NSArray *allKeys, *accounts;
|
||||||
NSDictionary *newLabels;
|
NSDictionary *newLabels;
|
||||||
NSString *name;
|
NSString *name;
|
||||||
|
id loginModule;
|
||||||
|
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
@ -2190,7 +2191,14 @@ static NSArray *reminderValues = nil;
|
||||||
v = [[v mutableCopy] autorelease];
|
v = [[v mutableCopy] autorelease];
|
||||||
|
|
||||||
if ([[v objectForKey: @"SOGoLoginModule"] isEqualToString: @"Last"])
|
if ([[v objectForKey: @"SOGoLoginModule"] isEqualToString: @"Last"])
|
||||||
|
{
|
||||||
[v setObject: [NSNumber numberWithBool: YES] forKey: @"SOGoRememberLastModule"];
|
[v setObject: [NSNumber numberWithBool: YES] forKey: @"SOGoRememberLastModule"];
|
||||||
|
loginModule = [[[user userDefaults] source] objectForKey: @"SOGoLoginModule"];
|
||||||
|
if (loginModule)
|
||||||
|
[v setObject: loginModule forKey: @"SOGoLoginModule"];
|
||||||
|
else
|
||||||
|
[v removeObjectForKey: @"SOGoLoginModule"];
|
||||||
|
}
|
||||||
else
|
else
|
||||||
[v setObject: [NSNumber numberWithBool: NO] forKey: @"SOGoRememberLastModule"];
|
[v setObject: [NSNumber numberWithBool: NO] forKey: @"SOGoRememberLastModule"];
|
||||||
|
|
||||||
|
|
|
@ -25,6 +25,9 @@
|
||||||
|
|
||||||
data.SOGoMailLabelsColors = labels;
|
data.SOGoMailLabelsColors = labels;
|
||||||
|
|
||||||
|
if (data.SOGoRememberLastModule)
|
||||||
|
data.SOGoLoginModule = "Last";
|
||||||
|
|
||||||
// Mail editor autosave is a number of minutes or 0 if disabled
|
// Mail editor autosave is a number of minutes or 0 if disabled
|
||||||
data.SOGoMailAutoSave = parseInt(data.SOGoMailAutoSave) || 0;
|
data.SOGoMailAutoSave = parseInt(data.SOGoMailAutoSave) || 0;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue