From 7684a4932d413f4e44f48e3981caf654541c8a4b Mon Sep 17 00:00:00 2001 From: billz Date: Fri, 6 Dec 2024 01:22:28 -0800 Subject: [PATCH] Update w/ code attribution - thx @easylo --- includes/provider.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/includes/provider.php b/includes/provider.php index 1e5bf8a3..dafbe3ea 100755 --- a/includes/provider.php +++ b/includes/provider.php @@ -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) {