mirror of
https://github.com/pi-hole/web.git
synced 2024-12-06 19:36:21 +01:00
codacy fix (no functional change)
This commit is contained in:
@@ -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."\"");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user