aboutsummaryrefslogtreecommitdiffstats
path: root/packages
diff options
context:
space:
mode:
authorMartin Fuchs <mfuchs@pfsense.org>2008-08-25 10:45:56 +0000
committerMartin Fuchs <mfuchs@pfsense.org>2008-08-25 10:45:56 +0000
commit544ff5fdfbbeb5306d3b4d8d83efb70d9ae22b0a (patch)
treea6c3545e99f344b10d23e606793a33ac0648ee4f /packages
parent37fbe651c2955f141b6ac3714aa322ed61db3219 (diff)
downloadpfsense-packages-544ff5fdfbbeb5306d3b4d8d83efb70d9ae22b0a.tar.gz
pfsense-packages-544ff5fdfbbeb5306d3b4d8d83efb70d9ae22b0a.tar.bz2
pfsense-packages-544ff5fdfbbeb5306d3b4d8d83efb70d9ae22b0a.zip
force log_rotate number of days > 0
Diffstat (limited to 'packages')
-rw-r--r--packages/squid/squid.inc2
-rw-r--r--packages/squid3/squid.inc2
2 files changed, 2 insertions, 2 deletions
diff --git a/packages/squid/squid.inc b/packages/squid/squid.inc
index 44966271..a5121ef0 100644
--- a/packages/squid/squid.inc
+++ b/packages/squid/squid.inc
@@ -298,7 +298,7 @@ function squid_validate_general($post, $input_errors) {
$input_errors[] = "That is not a valid log location dir";
$log_rotate = trim($post['log_rotate']);
- if (!empty($log_rotate) && !is_numeric($log_rotate))
+ if (!empty($log_rotate) && !is_numeric($log_rotate) or ($log_rotate < 1))
$input_errors[] = 'You must enter a valid number of days \'Log rotate\' field';
$webgui_port = $config['system']['webgui']['port'];
diff --git a/packages/squid3/squid.inc b/packages/squid3/squid.inc
index 849693e9..5b22b936 100644
--- a/packages/squid3/squid.inc
+++ b/packages/squid3/squid.inc
@@ -299,7 +299,7 @@ function squid_validate_general($post, $input_errors) {
$input_errors[] = "That is not a valid log location dir";
$log_rotate = trim($post['log_rotate']);
- if (!empty($log_rotate) && !is_numeric($log_rotate))
+ if (!empty($log_rotate) && !is_numeric($log_rotate) or ($log_rotate < 1))
$input_errors[] = 'You must enter a valid number of days \'Log rotate\' field';
$webgui_port = $config['system']['webgui']['port'];