codacy fix (no functional change)

This commit is contained in:
DL6ER
2016-12-21 14:52:59 +01:00
parent 264c25203b
commit abe2203acc
+3 -1
View File
@@ -262,7 +262,7 @@
/******** Private Members ********/
function gravityCount() {
global $blackListFile;
global $gravityListName,$blackListFile;
$preEventHorizon = exec("grep -c ^ $gravityListName");
$blacklist = exec("grep -c ^ $blackListFile");
return ($preEventHorizon + $blacklist);
@@ -280,6 +280,7 @@
}
function countDnsQueries() {
global $logListName;
return exec("grep -c \": query\\[\" $logListName");
}
@@ -352,6 +353,7 @@
}
function countBlockedQueries() {
global $logListName;
$hostname = trim(file_get_contents("/etc/hostname"), "\x00..\x1F");
return exec("grep \"gravity.list\" $logListName | grep -v \"pi.hole\" | grep -v \" read \" | grep -v -c \"".$hostname."\"");
}