From 9ac2f805890c1c8f26d3b9ed00d38cfa21843669 Mon Sep 17 00:00:00 2001 From: Ad Schellevis Date: Tue, 25 Aug 2015 18:17:01 +0000 Subject: [PATCH] (legacy) reimplement previously removed code in firewall_schedule.php --- src/www/firewall_schedule.php | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/src/www/firewall_schedule.php b/src/www/firewall_schedule.php index bf64f9dcf..c0e8329d4 100644 --- a/src/www/firewall_schedule.php +++ b/src/www/firewall_schedule.php @@ -186,6 +186,39 @@ $main_buttons = array( } $arraycounter++; } + } else { + $tempdayFriendly = $timerange['position']; + $firstDayFound = false; + $tempFriendlyDayArray = explode(",", $tempdayFriendly); + $currentDay = ""; + $firstDay = ""; + $nextDay = ""; + $counter = 0; + foreach ($tempFriendlyDayArray as $day){ + if ($day != ""){ + if (!$firstDayFound) + { + $firstDay = $tempFriendlyDayArray[$counter]; + $firstDayFound = true; + } + $currentDay =$tempFriendlyDayArray[$counter]; + //get next day + $nextDay = $tempFriendlyDayArray[$counter+1]; + $currentDay++; + if ($currentDay != $nextDay){ + if ($firstprint) + $dayFriendly .= "
"; + $currentDay--; + if ($currentDay != $firstDay) + $dayFriendly .= $dayArray[$firstDay-1] . " - " . $dayArray[$currentDay-1]; + else + $dayFriendly .= $dayArray[$firstDay-1]; + $firstDayFound = false; + $firstprint = true; + } + $counter++; + } + } } $timeFriendly = $starttime . "-" . $stoptime; $description = $timerange['rangedescr'];