From 544ff5fdfbbeb5306d3b4d8d83efb70d9ae22b0a Mon Sep 17 00:00:00 2001 From: Martin Fuchs Date: Mon, 25 Aug 2008 10:45:56 +0000 Subject: force log_rotate number of days > 0 --- packages/squid/squid.inc | 2 +- packages/squid3/squid.inc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'packages') 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']; -- cgit v1.2.3