Skip to content

Commit

Permalink
(fix) respect disabled state of sending rate-limiting (fixes #4198)
Browse files Browse the repository at this point in the history
  • Loading branch information
extrafu committed Jul 4, 2017
1 parent 4bcc6d1 commit 722c813
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 3 deletions.
18 changes: 16 additions & 2 deletions SoObjects/SOGo/SOGoSystemDefaults.m
Expand Up @@ -578,12 +578,26 @@ - (int) maximumMessageSizeLimit
//
- (int) maximumMessageSubmissionCount
{
return [self integerForKey: @"SOGoMaximumMessageSubmissionCount"];
NSUInteger v;

v = [self integerForKey: @"SOGoMaximumMessageSubmissionCount"];

if (!v)
return NSUIntegerMax;

return v;
}

- (int) maximumRecipientCount
{
return [self integerForKey: @"SOGoMaximumRecipientCount"];
NSUInteger v;

v = [self integerForKey: @"SOGoMaximumRecipientCount"];

if (!v)
return NSUIntegerMax;

return v;
}

- (int) maximumSubmissionInterval
Expand Down
2 changes: 1 addition & 1 deletion UI/MailerUI/UIxMailEditor.m
Expand Up @@ -753,7 +753,7 @@ - (WOResponse *) sendAction
NSDictionary *messageSubmissions;
SOGoSystemDefaults *dd;

int messages_count, recipients_count;
NSUInteger messages_count, recipients_count;

messageSubmissions = [[SOGoCache sharedCache] messageSubmissionsCountForLogin: [[context activeUser] login]];
dd = [SOGoSystemDefaults sharedSystemDefaults];
Expand Down

0 comments on commit 722c813

Please sign in to comment.