Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Webslice
ISPConfig 3
Commits
b7ee5f0e
Commit
b7ee5f0e
authored
Jul 05, 2019
by
Till Brehm
Browse files
Fixed #5331 Disallow 0 as website harddisk quota value
parent
81d3cb1e
Changes
3
Hide whitespace changes
Inline
Side-by-side
interface/web/sites/lib/lang/de_web_vhost_domain.lng
View file @
b7ee5f0e
...
...
@@ -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.'
;
?>
interface/web/sites/lib/lang/en_web_vhost_domain.lng
View file @
b7ee5f0e
...
...
@@ -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.'
;
?>
interface/web/sites/web_vhost_domain_edit.php
View file @
b7ee5f0e
...
...
@@ -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
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment