aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorManu <manu@sd-110742.dedibox.fr>2026-01-10 18:32:09 +0100
committerManu <manu@sd-110742.dedibox.fr>2026-01-10 18:32:09 +0100
commit86f19c15fa01c02e30c60961e3f10a1b7d6e4fb6 (patch)
treeaa26809a4633b953e0717eba28ed377d62d93686
parent61fafcd4e0fe63ba9e4020e69ae8e86cf88b771e (diff)
downloadwww-86f19c15fa01c02e30c60961e3f10a1b7d6e4fb6.tar
www-86f19c15fa01c02e30c60961e3f10a1b7d6e4fb6.tar.gz
www-86f19c15fa01c02e30c60961e3f10a1b7d6e4fb6.tar.bz2
www-86f19c15fa01c02e30c60961e3f10a1b7d6e4fb6.tar.xz
www-86f19c15fa01c02e30c60961e3f10a1b7d6e4fb6.zip
fix wrong redirect to archive with release 10+x
-rw-r--r--en/downloads/get/index.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/en/downloads/get/index.php b/en/downloads/get/index.php
index f20c3dea6..8e40d2c4b 100644
--- a/en/downloads/get/index.php
+++ b/en/downloads/get/index.php
@@ -89,8 +89,9 @@ try {
$download_tmpl = get_download_link($product, $torrent);
//check if release is in archives, if yes redirect to the only mirror
$archives = range(1,8);
- $release = explode(' ', $product['name']);
- if (in_array($release[1][0], $archives)){
+ $name_parts = explode(' ', $product['name']);
+ $version_number = isset($name_parts[1]) ? intval($name_parts[1]) : 0; //10.1 to 10 or 4.1 to 4
+ if (in_array($version_number, $archives)){
$alt_mirrors = array();
$mirror_link = 'https://distrib-coffee.ipsl.jussieu.fr/pub/linux/Mageia-archive';
$show_alternate_mirrors = false;