|
@@ -757,6 +757,14 @@ function mailbox($_action, $_type, $_data = null, $_extra = null) {
|
|
|
$password2 = $_data['password2'];
|
|
|
$name = ltrim(rtrim($_data['name'], '>'), '<');
|
|
|
$quota_m = intval($_data['quota']);
|
|
|
+ if ((!isset($_SESSION['acl']['unlimited_quota']) || $_SESSION['acl']['quarantine_notification'] != "1") && $quota_m === 0) {
|
|
|
+ $_SESSION['return'][] = array(
|
|
|
+ 'type' => 'danger',
|
|
|
+ 'log' => array(__FUNCTION__, $_action, $_type, $_data_log, $_attr),
|
|
|
+ 'msg' => 'unlimited_quota_acl'
|
|
|
+ );
|
|
|
+ return false;
|
|
|
+ }
|
|
|
if (empty($name)) {
|
|
|
$name = $local_part;
|
|
|
}
|
|
@@ -2000,6 +2008,15 @@ function mailbox($_action, $_type, $_data = null, $_extra = null) {
|
|
|
);
|
|
|
continue;
|
|
|
}
|
|
|
+ // if already 0 == ok
|
|
|
+ if ((!isset($_SESSION['acl']['unlimited_quota']) || $_SESSION['acl']['unlimited_quota'] != "1") && ($quota_m == 0 && $is_now['quota'] != 0)) {
|
|
|
+ $_SESSION['return'][] = array(
|
|
|
+ 'type' => 'danger',
|
|
|
+ 'log' => array(__FUNCTION__, $_action, $_type, $_data_log, $_attr),
|
|
|
+ 'msg' => 'unlimited_quota_acl'
|
|
|
+ );
|
|
|
+ return false;
|
|
|
+ }
|
|
|
$stmt = $pdo->prepare("SELECT `quota`, `maxquota`
|
|
|
FROM `domain`
|
|
|
WHERE `domain` = :domain");
|