summaryrefslogtreecommitdiffstats
path: root/usr/local/www/firewall_schedule_edit.php
diff options
context:
space:
mode:
authorScott Dale <sdale@pfsense.org>2007-03-27 21:13:28 +0000
committerScott Dale <sdale@pfsense.org>2007-03-27 21:13:28 +0000
commitbd080157f3cff4db7ead56303fee048b4da4491b (patch)
treeccdce39a4357a681ef0e8cdccb36c11f8996a9cc /usr/local/www/firewall_schedule_edit.php
parentb2cd31a19b9131c253208235b03cd6a503e9a12d (diff)
downloadpfsense-bd080157f3cff4db7ead56303fee048b4da4491b.zip
pfsense-bd080157f3cff4db7ead56303fee048b4da4491b.tar.gz
update error checks for minutes ending in 59
Diffstat (limited to 'usr/local/www/firewall_schedule_edit.php')
-rw-r--r--usr/local/www/firewall_schedule_edit.php16
1 files changed, 10 insertions, 6 deletions
diff --git a/usr/local/www/firewall_schedule_edit.php b/usr/local/www/firewall_schedule_edit.php
index 07c2ace..41911a1 100644
--- a/usr/local/www/firewall_schedule_edit.php
+++ b/usr/local/www/firewall_schedule_edit.php
@@ -36,8 +36,8 @@ require("guiconfig.inc");
$starttimehr = 00;
$starttimemin = 00;
-$stoptimehr = 24;
-$stoptimemin = 00;
+$stoptimehr = 23;
+$stoptimemin = 59;
$dayArray = array ('Sun','Mon','Tues','Wed','Thur','Fri','Sat');
$monthArray = array ('January','February','March','April','May','June','July','August','September','October','November','December');
@@ -77,6 +77,10 @@ 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))
@@ -382,12 +386,12 @@ function processEntries(){
}
}
- if (stoptimemin != 15 && stoptimemin != 30 && stoptimemin != 45 && stoptimemin != 0){
- errors = "Error: Stop Minute must be in 15 minute increments.";
+ if (stoptimemin != 15 && stoptimemin != 30 && stoptimemin != 45 && stoptimemin != 0 && stoptimemin != 59){
+ errors = "Error: Stop Minute can only be 0, 15, 30, 45, or 59.";
passedValidiation = false;
}
- if (starttimemin != 15 && starttimemin != 30 && starttimemin != 45 && starttimemin != 0){
- errors = "Error: Start Minute must be in 15 minute increments.";
+ if (starttimemin != 15 && starttimemin != 30 && starttimemin != 45 && starttimemin != 0 && starttimemin != 59){
+ alert ("Error: Start Minute can only be 0, 15, 30, 45, or 59.");
passedValidiation = false;
}
OpenPOWER on IntegriCloud