|
|
@@ -608,20 +608,18 @@ function zimbraSingle_ChangePackage($params) {
|
|
|
return 'Error: could not set class of service for '. $params['username'];
|
|
|
}
|
|
|
$addonQuota = $params['configoptions']['addonQuota'] ? $params['configoptions']['addonQuota'] : 0;
|
|
|
- $newQuota = $params['configoptions']['newQuota'] ? $params['configoptions']['newQuota'] : 0;
|
|
|
- $addonQuota = $addonQuota + $newQuota;
|
|
|
- $params['configoptions']['newQuota'] = 0;
|
|
|
- $attrs['zimbraMailQuota'] = ($baseQuota + $addonQuota) * 1073741824;
|
|
|
+ $newAddQuota = $params['configoptions']['newAddQuota'] ? $params['configoptions']['newAddQuota'] : 0;
|
|
|
+ $attrs['zimbraMailQuota'] = ($baseQuota + $addonQuota +$newQuota) * 1073741824;
|
|
|
$response = $apiAccountManager->modifyAccount($params['username'], $attrs);
|
|
|
if(is_a($response, 'Exception')) {
|
|
|
logModuleCall(
|
|
|
'zimbrasingle',
|
|
|
__FUNCTION__,
|
|
|
$params,
|
|
|
- 'Error: could not update quota for '. $params['username'],
|
|
|
+ 'Error: could not update mailbox quota for '. $params['username'],
|
|
|
$response
|
|
|
);
|
|
|
- return 'Error: could not update quota for '. $params['username'];
|
|
|
+ return 'Error: could not update mailbox quota for '. $params['username'];
|
|
|
}
|
|
|
try {
|
|
|
Capsule::table('tblhosting')
|
|
|
@@ -821,10 +819,10 @@ function zimbraSingleUpdateQuota($params) {
|
|
|
'zimbrasingle',
|
|
|
__FUNCTION__,
|
|
|
$updateAddonQuota,
|
|
|
- 'Error: konnte addonOuota nicht speichern.',
|
|
|
+ 'Error: could not save addonOuota in database.',
|
|
|
$e->getMessage()
|
|
|
);
|
|
|
- return 'Error: konnte addonOuota nicht speichern.';
|
|
|
+ return 'Error: could not save addonOuota in database.';
|
|
|
}
|
|
|
$newAddQuotaFieldIDObj = Capsule::table('tblproductconfigoptions')
|
|
|
->join('tblhostingconfigoptions', 'tblproductconfigoptions.id', '=', 'tblhostingconfigoptions.configid')
|
|
|
@@ -845,10 +843,10 @@ function zimbraSingleUpdateQuota($params) {
|
|
|
'zimbrasingle',
|
|
|
__FUNCTION__,
|
|
|
$updateNewAddQuota,
|
|
|
- 'Error: konnte newAddQuota nicht zurücksetzen.',
|
|
|
+ 'Error: could not reset newAddOuota in database.',
|
|
|
$e->getMessage()
|
|
|
);
|
|
|
- return 'Error: konnte newAddQuota nicht zurücksetzen.';
|
|
|
+ return 'Error: could not reset newAddOuota in database.';
|
|
|
}
|
|
|
}
|
|
|
return 'success';
|