mirror of
https://github.com/pi-hole/web.git
synced 2026-04-24 10:50:23 +01:00
Use all the new Pi-hole v5.0 blocking status code also in the long-term data where it was forgotten to add them.
Signed-off-by: DL6ER <dl6er@dl6er.de>
This commit is contained in:
@@ -269,7 +269,7 @@ if (isset($_GET['topAds']) && $auth)
|
||||
{
|
||||
$limit = " AND timestamp <= :until";
|
||||
}
|
||||
$stmt = $db->prepare('SELECT domain,count(domain) FROM queries WHERE (STATUS == 1 OR STATUS == 4)'.$limit.' GROUP by domain order by count(domain) desc limit 10');
|
||||
$stmt = $db->prepare('SELECT domain,count(domain) FROM queries WHERE (STATUS == 1 OR STATUS > 3)'.$limit.' GROUP by domain order by count(domain) desc limit 10');
|
||||
$stmt->bindValue(":from", intval($_GET['from']), SQLITE3_INTEGER);
|
||||
$stmt->bindValue(":until", intval($_GET['until']), SQLITE3_INTEGER);
|
||||
$results = $stmt->execute();
|
||||
@@ -401,7 +401,7 @@ if (isset($_GET['getGraphData']) && $auth)
|
||||
$data = array_merge($data, $result);
|
||||
|
||||
// Count blocked queries in intervals
|
||||
$stmt = $db->prepare('SELECT (timestamp/:interval)*:interval interval, COUNT(*) FROM queries WHERE (status == 1 OR status == 4 OR status == 5)'.$limit.' GROUP by interval ORDER by interval');
|
||||
$stmt = $db->prepare('SELECT (timestamp/:interval)*:interval interval, COUNT(*) FROM queries WHERE (status == 1 OR status > 3)'.$limit.' GROUP by interval ORDER by interval');
|
||||
$stmt->bindValue(":from", $from, SQLITE3_INTEGER);
|
||||
$stmt->bindValue(":until", $until, SQLITE3_INTEGER);
|
||||
$stmt->bindValue(":interval", $interval, SQLITE3_INTEGER);
|
||||
|
||||
Reference in New Issue
Block a user