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.php10
1 files changed, 7 insertions, 3 deletions
diff --git a/mirrorlist.php b/mirrorlist.php
index c9df00d..56bebea 100644
--- a/mirrorlist.php
+++ b/mirrorlist.php
@@ -69,9 +69,13 @@ if (array_key_exists('country', $_GET)) {
$filter .= '"")';
}
- foreach ($ip_versions as $ip_version)
- if (strpos($request, '&ip_version=' . $ip_version . '&') !== false)
- $filter .= ' AND `mirror_statuses`.`ipv' . $ip_version . '`';
+ if (array_key_exists('ip_version', $_GET)) {
+ $filter .= ' AND (0';
+ foreach ($ip_versions as $ip_version)
+ if (strpos($request, '&ip_version=' . $ip_version . '&') !== false)
+ $filter .= ' OR `mirror_statuses`.`ipv' . $ip_version . '`';
+ $filter .= ')';
+ }
$result = mysql_run_query(
'SELECT DISTINCT ' .