summaryrefslogtreecommitdiffstats
path: root/usr/local/www/firewall_schedule_edit.php
diff options
context:
space:
mode:
authorScott Dale <sdale@pfsense.org>2007-05-07 11:47:09 +0000
committerScott Dale <sdale@pfsense.org>2007-05-07 11:47:09 +0000
commite56fcb7132abc3b6de844682ca37b7b4834b3f47 (patch)
tree53f1b9b52cc8c3b9f9a45d77332b1a9641aba19c /usr/local/www/firewall_schedule_edit.php
parent3abc1918b8a64dd5bacfa12c2634d7ca06b3d715 (diff)
downloadpfsense-e56fcb7132abc3b6de844682ca37b7b4834b3f47.zip
pfsense-e56fcb7132abc3b6de844682ca37b7b4834b3f47.tar.gz
correctly determine if time range exists
Diffstat (limited to 'usr/local/www/firewall_schedule_edit.php')
-rw-r--r--usr/local/www/firewall_schedule_edit.php10
1 files changed, 4 insertions, 6 deletions
diff --git a/usr/local/www/firewall_schedule_edit.php b/usr/local/www/firewall_schedule_edit.php
index a187723..df0fff2 100644
--- a/usr/local/www/firewall_schedule_edit.php
+++ b/usr/local/www/firewall_schedule_edit.php
@@ -77,10 +77,6 @@ if ($_POST) {
$input_errors[] = "The schedule name may only consist of the characters a-z, A-Z, 0-9";
}
- if (!$_POST['schedule0'])
- $input_errors[] = "The schedule must have at least one time range configured.";
-
-
/* check for name conflicts */
foreach ($a_schedules as $schedule) {
if (isset($id) && ($a_schedules[$id]) && ($a_schedules[$id] === $schedule))
@@ -96,9 +92,10 @@ if ($_POST) {
$schedule['name'] = $_POST['name'];
$schedule['descr'] = htmlentities($_POST['descr'], ENT_QUOTES, 'UTF-8');
-
+ $timerangeFound = false;
for ($x=0; $x<99; $x++){
if($_POST['schedule' . $x]) {
+ $timerangeFound = true;
$timeparts = array();
$firstprint = false;
$timestr = $_POST['schedule' . $x];
@@ -141,8 +138,9 @@ if ($_POST) {
$schedule['timerange'][$x] = $timeparts;
}
}
-
+ if (!$timerangeFound)
+ $input_errors[] = "The schedule must have at least one time range configured.";
if (!$input_errors) {
OpenPOWER on IntegriCloud