diff options
Diffstat (limited to 'en/downloads/get/index.php')
-rw-r--r-- | en/downloads/get/index.php | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/en/downloads/get/index.php b/en/downloads/get/index.php index 16967a737..f20c3dea6 100644 --- a/en/downloads/get/index.php +++ b/en/downloads/get/index.php @@ -84,23 +84,23 @@ try { $product['file'] = $release . '-' . $type . '-' . $lang . '.' . $extension; $product['name'] = $product['file']; } + $all_mirrors = get_mirrors_for($product['file'], 'en', get('country'), true, $documentation, true); + $one_mirror = $all_mirrors[0]; + $download_tmpl = get_download_link($product, $torrent); //check if release is in archives, if yes redirect to the only mirror - $archives = range(1,7); + $archives = range(1,8); $release = explode(' ', $product['name']); if (in_array($release[1][0], $archives)){ - $download_tmpl = get_download_link($product, $torrent); - $download = str_replace('$MIRROR', 'https://distrib-coffee.ipsl.jussieu.fr/pub/linux/Mageia-archive', $download_tmpl); + $alt_mirrors = array(); + $mirror_link = 'https://distrib-coffee.ipsl.jussieu.fr/pub/linux/Mageia-archive'; $show_alternate_mirrors = false; } else { - $all_mirrors = get_mirrors_for($product['file'], 'en', get('country'), true, $documentation, true); - $one_mirror = $all_mirrors[0]; - $alt_mirrors = $all_mirrors[1]; - $download_tmpl = get_download_link($product, $torrent); - $show_alternate_mirrors = true; - - // Step 2. Make the actual download link against the preferred mirror returned. - $download = str_replace('$MIRROR', $one_mirror['mirror_url'], $download_tmpl); + $alt_mirrors = $all_mirrors[1]; + $mirror_link = $one_mirror['mirror_url']; + $show_alternate_mirrors = true; } + // Step 2. Make the actual download link against the preferred mirror returned. + $download = str_replace('$MIRROR', $mirror_link, $download_tmpl); // TODO do not redirect if it's a bot! $js_redirect = sprintf( |