index : archweb32 | |
Archlinux32 website | gitolite user |
summaryrefslogtreecommitdiff |
author | Andreas Baumann <mail@andreasbaumann.cc> | 2022-01-27 16:42:54 +0100 |
---|---|---|
committer | Andreas Baumann <mail@andreasbaumann.cc> | 2022-01-27 16:42:54 +0100 |
commit | fdd088f53a69e4b758250abab6dcde011099d61f (patch) | |
tree | 750ba91f67388f0f61f949f6ef6da7d0deeaa437 /mirrorlist.php | |
parent | 8eec1efd97d96910497739bb31cad31081e6965d (diff) |
-rw-r--r-- | mirrorlist.php | 8 |
diff --git a/mirrorlist.php b/mirrorlist.php index d15020c..912010e 100644 --- a/mirrorlist.php +++ b/mirrorlist.php @@ -42,7 +42,9 @@ while ($row = $result -> fetch_assoc()) $ip_versions = array('4', '6'); -if (array_key_exists('country', $_GET)) { +# archinstall sends no country, so we can not take this as a hint here whether +# we come via the form or not +if ( count($_GET) > 1 ) { if (array_key_exists('use_mirror_status', $_GET)) $order = '(`mirror_statuses`.`start`-`mirror_statuses`.`last_sync`) DESC'; @@ -64,7 +66,9 @@ if (array_key_exists('country', $_GET)) { $filter .= '"")'; } - if (strpos($request, '&country=all&') === false) { + if (strpos($request, '&country=all&') !== false || strpos($request, "&country=") === false ) { + // country us all or doesn't exist (archinsetall) => do not filter by country + } else { $filter .= ' AND `mirror_statuses`.`country_code` IN ('; foreach ($countries as $country) if (strpos($request, '&country=' . $country['country_code'] . '&') !== false) |