mirror of
https://github.com/billz/raspap-webgui.git
synced 2025-12-26 23:26:47 +01:00
Update blocklistProviders, extract names from json
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user