summaryrefslogtreecommitdiffstats
path: root/src/usr/local/www/interfaces_bridge_edit.php
diff options
context:
space:
mode:
authorChris Buechler <cmb@pfsense.org>2015-09-21 19:13:34 -0500
committerChris Buechler <cmb@pfsense.org>2015-09-21 19:13:34 -0500
commitee55642c57936d65d7f3ca88c1660945c4744667 (patch)
treeed361c91e85115f3b9a0138a219c87edd8222a28 /src/usr/local/www/interfaces_bridge_edit.php
parenta1f318f9c67f2d14ba857a62a6fc9dc1777e7a35 (diff)
downloadpfsense-ee55642c57936d65d7f3ca88c1660945c4744667.zip
pfsense-ee55642c57936d65d7f3ca88c1660945c4744667.tar.gz
interfaces_bridge_edit.php - input validation improvements, style fixes
Diffstat (limited to 'src/usr/local/www/interfaces_bridge_edit.php')
-rw-r--r--src/usr/local/www/interfaces_bridge_edit.php29
1 files changed, 15 insertions, 14 deletions
diff --git a/src/usr/local/www/interfaces_bridge_edit.php b/src/usr/local/www/interfaces_bridge_edit.php
index 4377555..cdc6a94 100644
--- a/src/usr/local/www/interfaces_bridge_edit.php
+++ b/src/usr/local/www/interfaces_bridge_edit.php
@@ -135,29 +135,29 @@ if ($_POST) {
do_input_validation($_POST, $reqdfields, $reqdfieldsn, $input_errors);
- if ($_POST['maxage'] && !is_numeric($_POST['maxage'])) {
+ if ($_POST['maxage'] && !is_numericint($_POST['maxage'])) {
$input_errors[] = gettext("Maxage needs to be an integer between 6 and 40.");
}
- if ($_POST['maxaddr'] && !is_numeric($_POST['maxaddr'])) {
+ if ($_POST['maxaddr'] && !is_numericint($_POST['maxaddr'])) {
$input_errors[] = gettext("Maxaddr needs to be an integer.");
}
- if ($_POST['timeout'] && !is_numeric($_POST['timeout'])) {
+ if ($_POST['timeout'] && !is_numericint($_POST['timeout'])) {
$input_errors[] = gettext("Timeout needs to be an integer.");
}
- if ($_POST['fwdelay'] && !is_numeric($_POST['fwdelay'])) {
+ if ($_POST['fwdelay'] && !is_numericint($_POST['fwdelay'])) {
$input_errors[] = gettext("Forward Delay needs to be an integer between 4 and 30.");
}
- if ($_POST['hellotime'] && !is_numeric($_POST['hellotime'])) {
+ if ($_POST['hellotime'] && !is_numericint($_POST['hellotime'])) {
$input_errors[] = gettext("Hello time for STP needs to be an integer between 1 and 2.");
}
- if ($_POST['priority'] && !is_numeric($_POST['priority'])) {
+ if ($_POST['priority'] && !is_numericint($_POST['priority'])) {
$input_errors[] = gettext("Priority for STP needs to be an integer between 0 and 61440.");
}
- if ($_POST['holdcnt'] && !is_numeric($_POST['holdcnt'])) {
+ if ($_POST['holdcnt'] && !is_numericint($_POST['holdcnt'])) {
$input_errors[] = gettext("Transmit Hold Count for STP needs to be an integer between 1 and 10.");
}
foreach ($ifacelist as $ifn => $ifdescr) {
- if ($_POST[$ifn] <> "" && !is_numeric($_POST[$ifn])) {
+ if ($_POST[$ifn] <> "" && !is_numericint($_POST[$ifn])) {
$input_errors[] = "{$ifdescr} " . gettext("interface priority for STP needs to be an integer between 0 and 240.");
}
}
@@ -299,8 +299,9 @@ function build_member_list() {
foreach ($ifacelist as $ifn => $ifinfo) {
$memberlist['list'][$ifn] = $ifinfo;
- if (in_array($ifn, $members_array))
- array_push($memberlist['selected'], $ifn);
+ if (in_array($ifn, $members_array)) {
+ array_push($memberlist['selected'], $ifn);
+ }
}
unset($members_array);
return($memberlist);
@@ -309,14 +310,14 @@ function build_member_list() {
function build_port_list($selecton) {
global $pconfig, $ifacelist;
- $portlist = array('list' => array(),
- 'selected' => array());
+ $portlist = array('list' => array(), 'selected' => array());
foreach ($ifacelist as $ifn => $ifdescr) {
$portlist['list'][$ifn] = $ifdescr;
- if (stristr($selecton, $ifn))
- array_push($portlist['selected'], $ifn);
+ if (stristr($selecton, $ifn)) {
+ array_push($portlist['selected'], $ifn);
+ }
}
return($portlist);
OpenPOWER on IntegriCloud