1
0
mirror of https://github.com/billz/raspap-webgui.git synced 2025-04-22 19:18:58 +02:00

Update w/ code attribution - thx @easylo

This commit is contained in:
billz 2024-12-06 01:22:28 -08:00
parent 4d1b746932
commit 7684a4932d

View File

@ -278,6 +278,10 @@ function getCountries($id, $binPath)
$countries[$value] = str_replace("_", " ", $value);
}
break;
/**
* Thanks to GitHub user @easylo who contributed this portion
* of the AdGuard CLI country output parsing
*/
case 4: // adguard
$raw_countries = [];
$totalLines = count($output);
@ -302,7 +306,7 @@ function getCountries($id, $binPath)
ksort($raw_countries);
// sort cities within each country
foreach ($raw_countries as $country => $cities) {
sort($raw_countries[$country]); // Trier les villes par ordre alphabétique
sort($raw_countries[$country]);
}
// sort results by country, then by city
foreach ($raw_countries as $country => $cities) {