aboutsummaryrefslogtreecommitdiffstats
path: root/config/mailreport/mail_reports.inc
diff options
context:
space:
mode:
Diffstat (limited to 'config/mailreport/mail_reports.inc')
-rw-r--r--config/mailreport/mail_reports.inc3
1 files changed, 1 insertions, 2 deletions
diff --git a/config/mailreport/mail_reports.inc b/config/mailreport/mail_reports.inc
index cf8c837c..94c7500c 100644
--- a/config/mailreport/mail_reports.inc
+++ b/config/mailreport/mail_reports.inc
@@ -1232,8 +1232,7 @@ function mail_report_get_log($logfile, $tail, $grepfor) {
$logarr = "";
$grepline = " ";
if(is_array($grepfor))
- foreach($grepfor as $agrep)
- $grepline .= " | grep \"$agrep\"";
+ $grepline = " | /usr/bin/egrep " . escapeshellarg(implode("|", $grepfor));
if($config['system']['disablesyslogclog']) {
exec("cat {$logfile}{$grepline} | /usr/bin/tail -n {$tail}", $logarr);
} else {