mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-05-23 04:15:26 +00:00
Sanitize value of SOGoMailAutoSave
This commit is contained in:
@@ -8,6 +8,7 @@ Bug fixes
|
||||
- sogo-tool manage-acl not working on v2 (#4292)
|
||||
- [web] restored mail threads state of inbox on initial page load
|
||||
- [web] fixed and improved messages list in threads mode
|
||||
- [web] sanitize value of draft auto save timer, defaults to 5 minutes
|
||||
|
||||
2.3.23 (2017-10-18)
|
||||
-------------------
|
||||
|
||||
@@ -372,7 +372,7 @@ NSString *SOGoWeekStartFirstFullWeek = @"FirstFullWeek";
|
||||
userLanguage = [source objectForKey: @"SOGoLanguage"];
|
||||
if (!(userLanguage && [userLanguage isKindOfClass: [NSString class]]))
|
||||
userLanguage = [(SOGoDomainDefaults *) parentSource language];
|
||||
|
||||
|
||||
supportedLanguages = [[SOGoSystemDefaults sharedSystemDefaults]
|
||||
supportedLanguages];
|
||||
|
||||
@@ -541,7 +541,14 @@ NSString *SOGoWeekStartFirstFullWeek = @"FirstFullWeek";
|
||||
|
||||
- (void) setMailAutoSave: (NSString *) newValue
|
||||
{
|
||||
[self setObject: newValue forKey: @"SOGoMailAutoSave"];
|
||||
NSString *s;
|
||||
|
||||
if ([newValue intValue] == 0)
|
||||
s = @"5";
|
||||
else
|
||||
s = newValue;
|
||||
|
||||
[self setObject: s forKey: @"SOGoMailAutoSave"];
|
||||
}
|
||||
|
||||
- (NSString *) mailAutoSave
|
||||
@@ -552,7 +559,7 @@ NSString *SOGoWeekStartFirstFullWeek = @"FirstFullWeek";
|
||||
|
||||
if ([s intValue] == 0)
|
||||
s = @"5";
|
||||
|
||||
|
||||
return s;
|
||||
}
|
||||
|
||||
|
||||
@@ -384,7 +384,7 @@ function initAddresses() {
|
||||
}
|
||||
|
||||
function initAutoSaveTimer() {
|
||||
var autoSave = UserDefaults["SOGoMailAutoSave"];
|
||||
var autoSave = parseInt(UserDefaults["SOGoMailAutoSave"]) || 5;
|
||||
|
||||
if (autoSave) {
|
||||
var interval;
|
||||
|
||||
Reference in New Issue
Block a user