index : archweb32 | |
Archlinux32 website | gitolite user |
summaryrefslogtreecommitdiff |
-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) |