diff options
author | Phil Davis <phil.davis@inf.org> | 2015-05-11 09:07:17 +0545 |
---|---|---|
committer | Phil Davis <phil.davis@inf.org> | 2015-05-11 09:07:17 +0545 |
commit | accb57567951cfa53f5c5b2555c0bb998a2ee004 (patch) | |
tree | 09f91c3f1f330831c7947a076fa98fc0998f4265 /usr/local/www/firewall_shaper_layer7.php | |
parent | d0c28e66a81bb06183b09514c6d1aa87e9c4deb0 (diff) | |
download | pfsense-accb57567951cfa53f5c5b2555c0bb998a2ee004.zip pfsense-accb57567951cfa53f5c5b2555c0bb998a2ee004.tar.gz |
Minor changes to firewall_shaper_layer7
The tabbing of this code is not so good, so it is difficult to see what is going on. I will format that in a later pull request.
These things look unbalanced but actually were not at run time. These changes make it easier to check the code in an editor that can show the balanced "table" "/table", "selected" "/selected".
1) Take the "table" start declaration out of the output form var that has been built up. Put it in-line in the code so it can be seen to match the "/table" now at line 575. $output var is no longer needed.
2) Remove 3 "/select" that were each inside an "if" statement. Put a single "/select" at the end. This makes it easy to see the matching "select" and "/select" and also ensures there will always be a "/select" written.
I thought these things were worth doing separate to code-style, as they are "real" changes. The L7 form still works in my testing.
Diffstat (limited to 'usr/local/www/firewall_shaper_layer7.php')
-rw-r--r-- | usr/local/www/firewall_shaper_layer7.php | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/usr/local/www/firewall_shaper_layer7.php b/usr/local/www/firewall_shaper_layer7.php index 64e2457..2c724ac 100644 --- a/usr/local/www/firewall_shaper_layer7.php +++ b/usr/local/www/firewall_shaper_layer7.php @@ -220,9 +220,6 @@ if (is_array($layer7_rules_list)) { } } $tree .= "</ul>"; - -$output = "<table summary=\"output form\">"; -$output .= $output_form; $closehead = false; include("head.inc"); ?> @@ -435,8 +432,9 @@ function removeRow(tbl,row) { </td> <td width="75%" valign="top" align="center"> <div id="shaperarea" style="position:relative"> + <table summary="output form"> <?php - echo $output; + echo $output_form; ?> <!-- Layer 7 rules form --> @@ -524,20 +522,18 @@ function removeRow(tbl,row) { <?php foreach($avail_behaviours_action as $behaviour): ?> <option value="<?=$behaviour ?>" <?php if ($behaviour == $l7rule->GetRBehaviour()) echo "selected=\"selected\""; ?>><?=$behaviour;?></option> <?php endforeach; ?> - </select> <?php endif; ?> <?php if($l7rule->GetRStructure() == "queue"): ?> <?php foreach($avail_behaviours_altq as $behaviour): ?> <option value="<?=$behaviour ?>" <?php if ($behaviour == $l7rule->GetRBehaviour()) echo "selected=\"selected\""; ?>><?=$behaviour;?></option> <?php endforeach; ?> - </select> <?php endif; ?> <?php if($l7rule->GetRStructure() == "limiter"): ?> <?php foreach($avail_behaviours_limiter as $behaviour): ?> <option value="<?=$behaviour ?>" <?php if ($behaviour == $l7rule->GetRBehaviour()) echo "selected=\"selected\""; ?>><?=$behaviour;?></option> <?php endforeach; ?> - </select> <?php endif; ?> + </select> </td> <td> <a onclick="removeRow('maintable',this.parentNode.parentNode); return false;" href="#"><img border="0" src="/themes/<?=$g['theme'];?>/images/icons/icon_x.gif" alt="x" /></a> |