mirror of
https://github.com/pi-hole/web.git
synced 2024-12-06 19:36:21 +01:00
Merge pull request #185 from pi-hole/bugfix/Gravcount
Fix Gravity Count logic
This commit is contained in:
@@ -1,13 +1,13 @@
|
||||
<?php
|
||||
$log = array();
|
||||
$ipv6 = parse_ini_file("/etc/pihole/setupVars.conf")['IPv6_address'] != "";
|
||||
$divide = parse_ini_file("/etc/pihole/setupVars.conf")['IPv6_address'] != "" && parse_ini_file("/etc/pihole/setupVars.conf")['IPv4_address'] != "";
|
||||
$hosts = file_exists("/etc/hosts") ? file("/etc/hosts") : array();
|
||||
$log = new \SplFileObject('/var/log/pihole.log');
|
||||
|
||||
/******* Public Members ********/
|
||||
function getSummaryData() {
|
||||
global $log, $ipv6;
|
||||
$domains_being_blocked = gravityCount() / ($ipv6 ? 2 : 1);
|
||||
global $log, $divide;
|
||||
$domains_being_blocked = gravityCount() / ($divide ? 2 : 1);
|
||||
|
||||
$dns_queries_today = count(getDnsQueries($log));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user