Skip to content

Commit b7ee5f0

Browse files
author
Till Brehm
committed
Fixed #5331 Disallow 0 as website harddisk quota value
1 parent 81d3cb1 commit b7ee5f0

File tree

3 files changed

+7
-0
lines changed

3 files changed

+7
-0
lines changed

interface/web/sites/lib/lang/de_web_vhost_domain.lng

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,4 +152,5 @@ $wb['https_port_error_regex'] = 'HTTPS Port invalid.';
152152
$wb['enable_pagespeed_txt'] = 'Enable PageSpeed';
153153
$wb['log_retention_txt'] = 'Log-Dateien Aufbewahrungszeit';
154154
$wb['log_retention_error_regex'] = 'Aufbewahrungszeit in Tagen (Erlaubte Werte: min. 0 - max. 9999)';
155+
$wb['limit_web_quota_not_0_txt'] = 'Harddisk Quota kann nicht 0 sein.';
155156
?>

interface/web/sites/lib/lang/en_web_vhost_domain.lng

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,4 +157,5 @@ $wb['https_port_error_regex'] = 'HTTPS Port invalid.';
157157
$wb['enable_pagespeed_txt'] = 'Enable PageSpeed';
158158
$wb['log_retention_txt'] = 'Logfiles retention time';
159159
$wb['log_retention_error_regex'] = 'Retention time in days (allowed values: min. 0 - max. 9999)';
160+
$wb['limit_web_quota_not_0_txt'] = 'Harddisk Quota cannot be set to 0.';
160161
?>

interface/web/sites/web_vhost_domain_edit.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1065,6 +1065,11 @@ function onSubmit() {
10651065
}
10661066

10671067
if($this->_vhostdomain_type == 'domain') {
1068+
//* ensure that quota value is not 0 when vhost type = domain
1069+
if(isset($_POST["hd_quota"]) && $_POST["hd_quota"] == 0) {
1070+
$app->tform->errorMessage .= $app->tform->lng("limit_web_quota_not_0_txt")."<br>";
1071+
}
1072+
10681073
//* Check the website quota of the client
10691074
if(isset($_POST["hd_quota"]) && $client["limit_web_quota"] >= 0 && $_POST["hd_quota"] != $old_web_values["hd_quota"]) {
10701075
$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);

0 commit comments

Comments
 (0)