diff --git a/data/web/inc/functions.mailbox.inc.php b/data/web/inc/functions.mailbox.inc.php index a2f181c4a..b537467c5 100644 --- a/data/web/inc/functions.mailbox.inc.php +++ b/data/web/inc/functions.mailbox.inc.php @@ -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" ) {