diff options
author | Renato Botelho <renato@netgate.com> | 2016-01-18 08:17:23 -0200 |
---|---|---|
committer | Renato Botelho <renato@netgate.com> | 2016-01-18 08:17:23 -0200 |
commit | c56a541d13ec142c0b5ef2f7d6944f15b694b604 (patch) | |
tree | b1c562b9a5e922d0f2185dc50a522d690969e5be /src | |
parent | e18a24166415fc2a4de8fe124ca5051f407e7c1d (diff) | |
parent | 27e1e9d51e0db308b3eede5200f615f24aed53f1 (diff) | |
download | pfsense-c56a541d13ec142c0b5ef2f7d6944f15b694b604.zip pfsense-c56a541d13ec142c0b5ef2f7d6944f15b694b604.tar.gz |
Merge pull request #2461 from NewEraCracker/php-standards
Diffstat (limited to 'src')
-rw-r--r-- | src/usr/local/www/guiconfig.inc | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/src/usr/local/www/guiconfig.inc b/src/usr/local/www/guiconfig.inc index d09213b..b97ae0f 100644 --- a/src/usr/local/www/guiconfig.inc +++ b/src/usr/local/www/guiconfig.inc @@ -560,20 +560,21 @@ function dump_clog_no_table($logfile, $tail, $withorig = true, $grepfor = "", $g $specific_log = basename($logfile, '.log') . '_settings'; if ($config['syslog'][$specific_log]['cronorder'] == 'forward') $sor = ""; if ($config['syslog'][$specific_log]['cronorder'] == 'reverse') $sor = "-r"; - $logarr = ""; + $logarr = array(); $grepline = " "; if (is_array($grepfor)) { + $invert = ''; if ((strpos($grepfor[0], '!') === 0)) { $grepfor[0] = substr($grepfor[0], 1); $invert = '-v'; } - $grepline .= " | /usr/bin/egrep $invert " . escapeshellarg(implode("|", $grepfor)); + $grepline .= " | /usr/bin/egrep {$invert} " . escapeshellarg(implode("|", $grepfor)); } if (is_array($grepinvert)) { $grepline .= " | /usr/bin/egrep -v " . escapeshellarg(implode("|", $grepinvert)); } if (is_dir($logfile)) { - $logarr = array("File $logfile is a directory."); + $logarr = array("File {$logfile} is a directory."); } elseif (file_exists($logfile) && filesize($logfile) == 0) { $logarr = array("Log file started."); } else { @@ -610,20 +611,21 @@ function dump_clog($logfile, $tail, $withorig = true, $grepfor = "", $grepinvert $specific_log = basename($logfile, '.log') . '_settings'; if ($config['syslog'][$specific_log]['cronorder'] == 'forward') $sor = ""; if ($config['syslog'][$specific_log]['cronorder'] == 'reverse') $sor = "-r"; - $logarr = ""; + $logarr = array(); $grepline = " "; if (is_array($grepfor)) { + $invert = ''; if ((strpos($grepfor[0], '!') === 0)) { $grepfor[0] = substr($grepfor[0], 1); $invert = '-v'; } - $grepline .= " | /usr/bin/egrep $invert " . escapeshellarg(implode("|", $grepfor)); + $grepline .= " | /usr/bin/egrep {$invert} " . escapeshellarg(implode("|", $grepfor)); } if (is_array($grepinvert)) { $grepline .= " | /usr/bin/egrep -v " . escapeshellarg(implode("|", $grepinvert)); } if (is_dir($logfile)) { - $logarr = array("File $logfile is a directory."); + $logarr = array("File {$logfile} is a directory."); } elseif (file_exists($logfile) && filesize($logfile) == 0) { $logarr = array("Log file started."); } else { @@ -659,7 +661,7 @@ function return_clog($logfile, $tail, $withorig = true, $grepfor = "", $grepinve $specific_log = basename($logfile, '.log') . '_settings'; if (($config['syslog'][$specific_log]['cronorder'] == 'forward') && !$grepreverse) $sor = ""; if (($config['syslog'][$specific_log]['cronorder'] == 'reverse') || $grepreverse) $sor = "-r"; - $logarr = ""; + $logarr = array(); $grepline = " "; if (is_array($grepfor)) { $grepline .= " | /usr/bin/egrep " . escapeshellarg(implode("|", $grepfor)); |