mirror of
https://github.com/mailcow/mailcow-dockerized.git
synced 2024-12-23 02:04:46 +02:00
[Web] Fix quota-left calculations when editing a mailbox (respect max domain quota)
This commit is contained in:
parent
d70f8a4ded
commit
64264767d7
@ -2361,6 +2361,14 @@ function mailbox($_action, $_type, $_data = null, $_extra = null) {
|
||||
);
|
||||
continue;
|
||||
}
|
||||
if ((($is_now['quota_used'] / 1048576) + $quota_m) > $DomainData['quota']) {
|
||||
$_SESSION['return'][] = array(
|
||||
'type' => 'danger',
|
||||
'log' => array(__FUNCTION__, $_action, $_type, $_data_log, $_attr),
|
||||
'msg' => array('mailbox_quota_left_exceeded', ($is_now['max_new_quota'] / 1048576))
|
||||
);
|
||||
continue;
|
||||
}
|
||||
if ($quota_m > $DomainData['maxquota']) {
|
||||
$_SESSION['return'][] = array(
|
||||
'type' => 'danger',
|
||||
@ -2369,14 +2377,6 @@ function mailbox($_action, $_type, $_data = null, $_extra = null) {
|
||||
);
|
||||
continue;
|
||||
}
|
||||
if (((($is_now['quota_used'] / 1048576) - $quota_m) + $quota_m) > $DomainData['quota']) {
|
||||
$_SESSION['return'][] = array(
|
||||
'type' => 'danger',
|
||||
'log' => array(__FUNCTION__, $_action, $_type, $_data_log, $_attr),
|
||||
'msg' => array('mailbox_quota_left_exceeded', ($is_now['max_new_quota'] / 1048576))
|
||||
);
|
||||
continue;
|
||||
}
|
||||
$extra_acls = array();
|
||||
if (isset($_data['extended_sender_acl'])) {
|
||||
if (!isset($_SESSION['acl']['extend_sender_acl']) || $_SESSION['acl']['extend_sender_acl'] != "1" ) {
|
||||
|
Loading…
Reference in New Issue
Block a user