mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-05-21 11:25:24 +00:00
Sanitize value of SOGoMailAutoSave
This commit is contained in:
@@ -543,7 +543,7 @@ NSString *SOGoWeekStartFirstFullWeek = @"FirstFullWeek";
|
||||
{
|
||||
NSString *s;
|
||||
|
||||
if ([newValue intValue] == 0)
|
||||
if ([newValue intValue] <= 0)
|
||||
s = @"5";
|
||||
else
|
||||
s = newValue;
|
||||
@@ -557,7 +557,7 @@ NSString *SOGoWeekStartFirstFullWeek = @"FirstFullWeek";
|
||||
|
||||
s = [self stringForKey: @"SOGoMailAutoSave"];
|
||||
|
||||
if ([s intValue] == 0)
|
||||
if ([s intValue] <= 0)
|
||||
s = @"5";
|
||||
|
||||
return s;
|
||||
|
||||
@@ -384,7 +384,7 @@ function initAddresses() {
|
||||
}
|
||||
|
||||
function initAutoSaveTimer() {
|
||||
var autoSave = parseInt(UserDefaults["SOGoMailAutoSave"]) || 5;
|
||||
var autoSave = Math.abs(parseInt(UserDefaults["SOGoMailAutoSave"])) || 5;
|
||||
|
||||
if (autoSave) {
|
||||
var interval;
|
||||
|
||||
Reference in New Issue
Block a user