summaryrefslogtreecommitdiffstats
path: root/src/usr/local/www/interfaces_qinq_edit.php
diff options
context:
space:
mode:
Diffstat (limited to 'src/usr/local/www/interfaces_qinq_edit.php')
-rw-r--r--src/usr/local/www/interfaces_qinq_edit.php23
1 files changed, 13 insertions, 10 deletions
diff --git a/src/usr/local/www/interfaces_qinq_edit.php b/src/usr/local/www/interfaces_qinq_edit.php
index 8d48db3..016330b 100644
--- a/src/usr/local/www/interfaces_qinq_edit.php
+++ b/src/usr/local/www/interfaces_qinq_edit.php
@@ -151,18 +151,18 @@ if ($_POST) {
$member = explode("-", $memb);
if (count($member) > 1) {
- if (preg_match("/([^0-9])+/", $member[0], $match) || preg_match("/([^0-9])+/", $member[1], $match))
+ if (preg_match("/([^0-9])+/", $member[0], $match) || preg_match("/([^0-9])+/", $member[1], $match)) {
$input_errors[] = gettext("Tags can contain only numbers or a range in format #-#.");
+ }
for ($i = $member[0]; $i <= $member[1]; $i++) {
$members .= ($isfirst == 0 ? '':' ') . $i;
$isfirst++;
}
- }
- else { // Just a single number
- if (preg_match("/([^0-9])+/", $memb, $match))
+ } else { // Just a single number
+ if (preg_match("/([^0-9])+/", $memb, $match)) {
$input_errors[] = gettext("Tags can contain only numbers or a range in format #-#.");
- else {
+ } else {
$members .= ($isfirst == 0 ? '':' ') . $memb;
$isfirst++;
}
@@ -246,8 +246,9 @@ function build_parent_list() {
$list = array();
foreach ($portlist as $ifn => $ifinfo) {
- if (is_jumbo_capable($ifn))
+ if (is_jumbo_capable($ifn)) {
$list[$ifn] = $ifn . ' (' . $ifinfo['mac'] . ')';
+ }
}
return($list);
@@ -255,8 +256,9 @@ function build_parent_list() {
include("head.inc");
-if ($input_errors)
+if ($input_errors) {
print_input_errors($input_errors);
+}
$form = new Form(new Form_Button(
'Submit',
@@ -313,12 +315,13 @@ $counter = 0;
$members = $pconfig['members'];
// List each of the member tags from the space-separated list
-if ($members != "")
+if ($members != "") {
$item = explode(" ", $members);
-else
+} else {
$item = array('');
+}
-foreach($item as $ww) {
+foreach ($item as $ww) {
$member = $item[$counter];
$group = new Form_Group($counter == 0 ? 'Tag(s)':'');
OpenPOWER on IntegriCloud