From 575876406caf4c17b8ee5fdc8bee09a086dada07 Mon Sep 17 00:00:00 2001 From: billz Date: Tue, 17 Jun 2025 06:59:14 -0700 Subject: [PATCH] Update blocklistProviders, extract names from json --- includes/functions.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/includes/functions.php b/includes/functions.php index f4e26eca..f1b90b9e 100755 --- a/includes/functions.php +++ b/includes/functions.php @@ -570,8 +570,13 @@ function dnsServers() function blocklistProviders() { - $data = json_decode(file_get_contents("./config/blocklists.json")); - return (array) $data; + $raw = json_decode(file_get_contents("./config/blocklists.json"), true); + $result = []; + + foreach ($raw as $group => $entries) { + $result[$group] = array_keys($entries); + } + return $result; } function optionsForSelect($options)