Changes concerning the date the gravity list was last changed. Used in the webinterface dashboard as a tooltip, and now also available in the API (both PHP and FTL). Function was moved to new file /scripts/pi-hole/php/gravity.php to keep things neat and to avoid duplicate code.

This commit is contained in:
Walter
2018-04-23 20:32:38 +02:00
parent dd7200267e
commit 2c2a091b03
4 changed files with 59 additions and 20 deletions

View File

@@ -31,6 +31,7 @@ else
if (isset($_GET['summary']) || isset($_GET['summaryRaw']) || !count($_GET))
{
require_once("scripts/pi-hole/php/gravity.php");
sendRequestFTL("stats");
$return = getResponseFTL();
@@ -61,6 +62,7 @@ else
$stats[$tmp[0]] = floatval($tmp[1]);
}
}
$stats['gravity_last_updated'] = gravity_last_update(true);
$data = array_merge($data,$stats);
}