From abe2203acc5f5a0071837d8be49ff2ec217a1f20 Mon Sep 17 00:00:00 2001 From: DL6ER Date: Wed, 21 Dec 2016 14:52:59 +0100 Subject: [PATCH] codacy fix (no functional change) --- scripts/pi-hole/php/data.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/pi-hole/php/data.php b/scripts/pi-hole/php/data.php index b180874b..76c94798 100644 --- a/scripts/pi-hole/php/data.php +++ b/scripts/pi-hole/php/data.php @@ -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."\""); }