mirror of
https://github.com/billz/raspap-webgui.git
synced 2025-03-01 10:31:47 +00:00
Merge pull request #1707 from RaspAP/maint/attribution
Update w/ code attribution - thx @easylo
This commit is contained in:
commit
a7ac30f548
@ -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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user