diff options
author | Phil Davis <phil.davis@inf.org> | 2015-12-10 17:01:11 +0545 |
---|---|---|
committer | Stephen Beaver <sbeaver@netgate.com> | 2015-12-10 10:09:30 -0500 |
commit | 4e322e2c189e18133324c933ad35f0735fab510f (patch) | |
tree | 91cb8c627c8efbe69ceb7e7dc41635d6a144e12e /src/etc/inc/filter_log.inc | |
parent | b3b10d30794a60ed9a781cc3c8e0d29b774bf86e (diff) | |
download | pfsense-4e322e2c189e18133324c933ad35f0735fab510f.zip pfsense-4e322e2c189e18133324c933ad35f0735fab510f.tar.gz |
Code style and white space in etc
Diffstat (limited to 'src/etc/inc/filter_log.inc')
-rw-r--r-- | src/etc/inc/filter_log.inc | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/src/etc/inc/filter_log.inc b/src/etc/inc/filter_log.inc index a010471..4a478ce 100644 --- a/src/etc/inc/filter_log.inc +++ b/src/etc/inc/filter_log.inc @@ -230,8 +230,9 @@ function parse_unknown_log_line($line) { $pattern = "/^" . $date_pattern . "\ +" . $log_message_pattern . "$/"; - if (!preg_match($pattern, $line, $log_split)) + if (!preg_match($pattern, $line, $log_split)) { return ""; + } list($all, $flent['time'], $flent['message']) = $log_split; @@ -241,10 +242,10 @@ function parse_unknown_log_line($line) { } /* If there is time, and message, fields, then the line should be usable/good */ - if (!( (trim($flent['time']) == "") && (trim($flent['message']) == "") )) { + if (!((trim($flent['time']) == "") && (trim($flent['message']) == ""))) { return $flent; } else { - if($g['debug']) { + if ($g['debug']) { log_error(sprintf(gettext("There was a error parsing log entry: %s. Please report to mailing list or forum."), $errline)); } return ""; @@ -269,8 +270,9 @@ function parse_system_log_line($line) { $pattern = "/^" . $date_pattern . "\ +" . $process_pattern . "\ +" . $pid_pattern . "\ +" . $log_message_pattern . "$/"; - if (!preg_match($pattern, $line, $log_split)) + if (!preg_match($pattern, $line, $log_split)) { return ""; + } list($all, $flent['time'], $flent['host'], $flent['process'], $flent['pid'], $flent['message']) = $log_split; @@ -280,10 +282,10 @@ function parse_system_log_line($line) { } /* If there is time, process, and message, fields, then the line should be usable/good */ - if (!( (trim($flent['time']) == "") && (trim($flent['process']) == "") && (trim($flent['message']) == "") )) { + if (!((trim($flent['time']) == "") && (trim($flent['process']) == "") && (trim($flent['message']) == ""))) { return $flent; } else { - if($g['debug']) { + if ($g['debug']) { log_error(sprintf(gettext("There was a error parsing log entry: %s. Please report to mailing list or forum."), $errline)); } return ""; @@ -552,7 +554,7 @@ function find_action_image($action) { function handle_ajax($nentries, $tail = 50) { global $config; if ($_GET['lastsawtime'] or $_POST['lastsawtime']) { - global $filter_logfile,$filterent; + global $filter_logfile, $filterent; if ($_GET['lastsawtime']) { $lastsawtime = $_GET['lastsawtime']; } |