Skip to content

Commit

Permalink
Merge pull request #1707 from RaspAP/maint/attribution
Browse files Browse the repository at this point in the history
Update w/ code attribution - thx @easylo
  • Loading branch information
billz authored Dec 7, 2024
2 parents 4d1b746 + 7684a49 commit a7ac30f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion includes/provider.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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) {
Expand Down

0 comments on commit a7ac30f

Please sign in to comment.