From 50b3fc5a0e1fb99747c325f6f5746f47d01e4f04 Mon Sep 17 00:00:00 2001 From: phildd Date: Thu, 30 Aug 2012 07:56:17 +0545 Subject: Month matching for scheduler rules Fix some obvious things in the firewall scheduled rules code. If a user has some rules with a month specified and some without, then this will make a difference. Might fix bug #2614? --- etc/inc/filter.inc | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'etc') diff --git a/etc/inc/filter.inc b/etc/inc/filter.inc index c5a8f70..8da51bd 100644 --- a/etc/inc/filter.inc +++ b/etc/inc/filter.inc @@ -3015,7 +3015,7 @@ function filter_get_time_based_rule_status($schedule) { if($timeday['month']) $month = $timeday['month']; else - $week = ""; + $month = ""; if($timeday['day']) $day = $timeday['day']; else @@ -3066,9 +3066,6 @@ function filter_tdr_day($schedule) { * Calculate day of month. * IE: 29th of may */ - $weekday = date("w"); - if($weekday == 0) - $weekday = 7; $date = date("d"); $defined_days = explode(",", $schedule); if($g['debug']) @@ -3096,7 +3093,7 @@ function filter_tdr_hour($schedule) { function filter_tdr_position($schedule) { global $g; /* - * Calculate possition, ie: day of week. + * Calculate position, ie: day of week. * Sunday = 7, Monday = 1, Tuesday = 2 * Weds = 3, Thursday = 4, Friday = 5, * Saturday = 6 -- cgit v1.1