Merge pull request #594 from pi-hole/tweak/API_stats_formating

Allow "domains_being_blocked" and "status" to contains non-numeric values
This commit is contained in:
Adam Warner
2017-10-31 19:39:54 +00:00
committed by GitHub

View File

@@ -33,6 +33,12 @@ if (isset($_GET['summary']) || isset($_GET['summaryRaw']) || !count($_GET))
{
$tmp = explode(" ",$line);
if(($tmp[0] === "domains_being_blocked" && !is_numeric($tmp[1])) || $tmp[0] === "status")
{
$stats[$tmp[0]] = $tmp[1];
continue;
}
if(isset($_GET['summary']))
{
if($tmp[0] !== "ads_percentage_today")