Commit b7ee5f0e authored by Till Brehm's avatar Till Brehm

Fixed #5331 Disallow 0 as website harddisk quota value

parent 81d3cb1e
......@@ -152,4 +152,5 @@ $wb['https_port_error_regex'] = 'HTTPS Port invalid.';
$wb['enable_pagespeed_txt'] = 'Enable PageSpeed';
$wb['log_retention_txt'] = 'Log-Dateien Aufbewahrungszeit';
$wb['log_retention_error_regex'] = 'Aufbewahrungszeit in Tagen (Erlaubte Werte: min. 0 - max. 9999)';
$wb['limit_web_quota_not_0_txt'] = 'Harddisk Quota kann nicht 0 sein.';
?>
......@@ -157,4 +157,5 @@ $wb['https_port_error_regex'] = 'HTTPS Port invalid.';
$wb['enable_pagespeed_txt'] = 'Enable PageSpeed';
$wb['log_retention_txt'] = 'Logfiles retention time';
$wb['log_retention_error_regex'] = 'Retention time in days (allowed values: min. 0 - max. 9999)';
$wb['limit_web_quota_not_0_txt'] = 'Harddisk Quota cannot be set to 0.';
?>
......@@ -1065,6 +1065,11 @@ class page_action extends tform_actions {
}
if($this->_vhostdomain_type == 'domain') {
//* ensure that quota value is not 0 when vhost type = domain
if(isset($_POST["hd_quota"]) && $_POST["hd_quota"] == 0) {
$app->tform->errorMessage .= $app->tform->lng("limit_web_quota_not_0_txt")."<br>";
}
//* Check the website quota of the client
if(isset($_POST["hd_quota"]) && $client["limit_web_quota"] >= 0 && $_POST["hd_quota"] != $old_web_values["hd_quota"]) {
$tmp = $app->db->queryOneRecord("SELECT sum(hd_quota) as webquota FROM web_domain WHERE domain_id != ? AND type = 'vhost' AND ".$app->tform->getAuthSQL('u'), $this->id);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment