mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-11-22 07:14:21 +00:00
feat(mail) Introduce option SOGoVacationAllowZeroDays to allow a sieve vacation days value of 0
This commit is contained in:
1 parent
7a7f85d1a7
commit
02dd5c3501
6 files changed
+38
-6
No files matched your search
@@ -60,6 +60,7 @@
|
||||
- (NSString *) vacationDefaultSubject;
|
||||
- (NSString *) vacationHeaderTemplateFile;
|
||||
- (NSString *) vacationFooterTemplateFile;
|
||||
- (BOOL) vacationAllowZeroDays;
|
||||
- (NSString *) mailingMechanism;
|
||||
- (NSString *) smtpServer;
|
||||
- (BOOL)smtpMasterUserEnabled;
|
||||
|
||||
@@ -277,6 +277,18 @@
|
||||
return [self stringForKey: @"SOGoVacationFooterTemplateFile"];
|
||||
}
|
||||
|
||||
- (BOOL) vacationAllowZeroDays
|
||||
{
|
||||
id o;
|
||||
|
||||
o = [self stringForKey: @"SOGoVacationAllowZeroDays"];
|
||||
|
||||
if (o)
|
||||
return [o boolValue];
|
||||
|
||||
return NO;
|
||||
}
|
||||
|
||||
- (NSString *) mailingMechanism
|
||||
{
|
||||
NSString *mailingMechanism;
|
||||
|
||||
@@ -1016,8 +1016,8 @@ static NSString *sieveScriptName = @"sogo";
|
||||
text = [NSString stringWithFormat: @"%@%@", text, [templateFile textForUser: user]];
|
||||
}
|
||||
|
||||
if (days == 0)
|
||||
days = 7;
|
||||
if (days <= 0)
|
||||
days = [dd vacationAllowZeroDays] ? 0 : 7;
|
||||
|
||||
vacation_script = [NSMutableString string];
|
||||
|
||||
|
||||
Reference in new issue
Block a user