diff options
author | Phil Davis <phil.davis@inf.org> | 2015-12-14 20:20:16 +0545 |
---|---|---|
committer | Phil Davis <phil.davis@inf.org> | 2015-12-14 20:20:16 +0545 |
commit | 947141fd21b4496d8963d1598d6ca6a2e000702c (patch) | |
tree | c4f39f94d05059417f3e5743fc7c826ea52657fc /src/usr/local/www/diag_dump_states.php | |
parent | 9ba351c17e4c85e01832e38b6ba7b6a7898a290d (diff) | |
download | pfsense-947141fd21b4496d8963d1598d6ca6a2e000702c.zip pfsense-947141fd21b4496d8963d1598d6ca6a2e000702c.tar.gz |
Code style usr local www a-e
Diffstat (limited to 'src/usr/local/www/diag_dump_states.php')
-rwxr-xr-x | src/usr/local/www/diag_dump_states.php | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/src/usr/local/www/diag_dump_states.php b/src/usr/local/www/diag_dump_states.php index c4c93d6..f5cd437 100755 --- a/src/usr/local/www/diag_dump_states.php +++ b/src/usr/local/www/diag_dump_states.php @@ -100,8 +100,8 @@ include("head.inc"); <script type="text/javascript"> //<![CDATA[ -events.push(function(){ - $('a[data-entry]').on('click', function(){ +events.push(function() { + $('a[data-entry]').on('click', function() { var el = $(this); var data = $(this).data('entry').split('|'); @@ -114,7 +114,7 @@ events.push(function(){ srcip: data[0], dstip: data[1] }, - success: function(){ + success: function() { el.parents('tr').remove(); }, }); @@ -126,8 +126,9 @@ events.push(function(){ <?php $tab_array = array(); $tab_array[] = array(gettext("States"), true, "diag_dump_states.php"); -if (isset($config['system']['lb_use_sticky'])) +if (isset($config['system']['lb_use_sticky'])) { $tab_array[] = array(gettext("Source Tracking"), false, "diag_dump_states_sources.php"); +} $tab_array[] = array(gettext("Reset States"), false, "diag_resetstate.php"); display_top_tabs($tab_array); @@ -182,8 +183,9 @@ print $form; $grepline = (isset($_POST['filter'])) ? "| /usr/bin/egrep " . escapeshellarg(htmlspecialchars($_POST['filter'])) : ""; $fd = popen("/sbin/pfctl -s state {$grepline}", "r"); while ($line = chop(fgets($fd))) { - if ($row >= 10000) + if ($row >= 10000) { break; + } $line_split = preg_split("/\s+/", $line); @@ -213,17 +215,18 @@ print $form; title="<?=sprintf(gettext('Remove all state entries from %s to %s'), $srcip, $dstip);?>"></a> </td> </tr> -<?php $row++; } +<?php $row++; } ?> </tbody> </table> <?php if ($row == 0) { - if (isset($_POST['filter']) && !empty($_POST['filter'])) + if (isset($_POST['filter']) && !empty($_POST['filter'])) { $errmsg = gettext('No states were found that match the current filter'); - else + } else { $errmsg = gettext('No states were found'); + } print('<p class="alert alert-warning">' . $errmsg . '</p>'); } |