Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/mirrorlist.php
diff options
context:
space:
mode:
Diffstat (limited to 'mirrorlist.php')
-rw-r--r--mirrorlist.php8
1 files changed, 6 insertions, 2 deletions
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)