From 9865652eb45d0cc5563b09d4c11b9a8772313509 Mon Sep 17 00:00:00 2001 From: Scott Ullrich Date: Tue, 3 Apr 2007 19:12:11 +0000 Subject: rework the check code to be more readable since it is falsing --- etc/inc/pfsense-utils.inc | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'etc') diff --git a/etc/inc/pfsense-utils.inc b/etc/inc/pfsense-utils.inc index d0db00b..a10ae2f 100644 --- a/etc/inc/pfsense-utils.inc +++ b/etc/inc/pfsense-utils.inc @@ -570,15 +570,20 @@ function get_time_based_rule_status($schedule) { else log_error("[TDR DEBUG] hourstatus has been set to false"); - if($monthstatus and $daystatus and $positionstatus and $hourstatus) { - $should_add_rule = true; - log_error("[TDR DEBUG] setting should add rule to true"); - } + if($monthstatus == true) + if($daystatus == true) + if($positionstatus == true) + if($hourstatus == true) { + $should_add_rule = true; + log_error("[TDR DEBUG] setting should add rule to true"); + } } + if($should_add_rule == true) log_error("[TDR DEBUG] should_add_rule == true"); else log_error("[TDR DEBUG] should_add_rule == true"); + return $should_add_rule; } -- cgit v1.1