diff options
author | Phil Davis <phil.davis@inf.org> | 2015-12-15 10:38:12 +0545 |
---|---|---|
committer | Phil Davis <phil.davis@inf.org> | 2015-12-15 10:38:12 +0545 |
commit | abe98adb911f9ff76af12034646a4c64e26d6390 (patch) | |
tree | 49c09b6bdf22f6afb54eb99e6d2287a8c65283d7 /src/usr/local/www/status_logs.php | |
parent | 7895a8802317a8477929bea6428bf8dfe214306f (diff) | |
download | pfsense-abe98adb911f9ff76af12034646a4c64e26d6390.zip pfsense-abe98adb911f9ff76af12034646a4c64e26d6390.tar.gz |
Code style status*
Diffstat (limited to 'src/usr/local/www/status_logs.php')
-rwxr-xr-x | src/usr/local/www/status_logs.php | 49 |
1 files changed, 26 insertions, 23 deletions
diff --git a/src/usr/local/www/status_logs.php b/src/usr/local/www/status_logs.php index 58cbe34..5e52393 100755 --- a/src/usr/local/www/status_logs.php +++ b/src/usr/local/www/status_logs.php @@ -243,11 +243,9 @@ if ($save_settings) { # Formatted/Raw Display if ($config['syslog'][$specific_log]['format'] == 'formatted') { $rawfilter = false; -} -else if ($config['syslog'][$specific_log]['format'] == 'raw') { +} else if ($config['syslog'][$specific_log]['format'] == 'raw') { $rawfilter = true; -} -else { # Use the general logging options setting (global). +} else { # Use the general logging options setting (global). $rawfilter = isset($config['syslog']['rawfilter']); } @@ -309,10 +307,11 @@ if (in_array($logfile, array('system', 'gateways', 'routing', 'resolver', 'wirel display_top_tabs($tab_array, false, 'nav nav-tabs'); } -if ($filter_active) +if ($filter_active) { $filter_state = SEC_OPEN; -else +} else { $filter_state = SEC_CLOSED; +} if (!$rawfilter) { // Advanced log filter form $form = new Form(false); @@ -367,8 +366,7 @@ if (!$rawfilter) { // Advanced log filter form null, 'fa-filter' ); -} -else { // Simple log filter form +} else { // Simple log filter form $form = new Form(false); $section = new Form_Section('Log Filter', 'basic-filter-panel', COLLAPSIBLE|$filter_state); @@ -412,20 +410,22 @@ print $form; // Now the forms are complete we can draw the log table and its controls if (!$rawfilter) { - if ($filterlogentries_submit) + if ($filterlogentries_submit) { $filterlog = conv_log_filter($system_logfile, $nentries, $nentries + 100, $filterfieldsarray); - else + } else { $filterlog = conv_log_filter($system_logfile, $nentries, $nentries + 100, $filtertext); + } ?> <div class="panel panel-default"> <div class="panel-heading"> <h2 class="panel-title"> <?php - if ((!$filtertext) && (!$filterfieldsarray)) + if ((!$filtertext) && (!$filterfieldsarray)) { printf(gettext("Last %d %s log entries."), count($filterlog), gettext($allowed_logs[$logfile]["name"])); - else + } else { printf(gettext("%d matched %s log entries."), count($filterlog), gettext($allowed_logs[$logfile]["name"])); + } printf(" (" . gettext("Maximum %d") . ")", $nentries); ?> @@ -466,16 +466,15 @@ if (!$rawfilter) { </tbody> </table> <?php - if (count($filterlog) == 0) + if (count($filterlog) == 0) { print_info_box(gettext('No logs to display')); + } ?> </div> </div> </div> <?php -} -else -{ +} else { ?> <div class="panel panel-default"> <div class="panel-heading"><h2 class="panel-title"><?=gettext("Last ")?><?=$nentries?> <?=gettext($allowed_logs[$logfile]["name"])?><?=gettext(" log entries")?></h2></div> @@ -489,21 +488,24 @@ else </thead> <tbody> <?php - if (($logfile == 'resolver') || ($logfile == 'system')) + if (($logfile == 'resolver') || ($logfile == 'system')) { $inverse = array("ppp"); - else + } else { $inverse = null; + } - if ($filtertext) + if ($filtertext) { $rows = dump_clog($system_logfile, $nentries, true, array("$filtertext"), $inverse); - else + } else { $rows = dump_clog($system_logfile, $nentries, true, array(), $inverse); + } ?> </tbody> </table> <?php - if ($rows == 0) + if ($rows == 0) { print_info_box(gettext('No logs to display')); + } ?> </div> </div> @@ -519,10 +521,11 @@ if ($input_errors) { $manage_log_active = true; } -if ($manage_log_active) +if ($manage_log_active) { $manage_log_state = SEC_OPEN; -else +} else { $manage_log_state = SEC_CLOSED; +} $form = new Form(false); |