diff options
author | Manuel Hiebel <leuhmanu@mageia.org> | 2021-11-04 20:41:13 +0100 |
---|---|---|
committer | Manuel Hiebel <leuhmanu@mageia.org> | 2021-11-04 20:41:13 +0100 |
commit | ba92c8890e27a502e795380246fddfe98dfb4b06 (patch) | |
tree | e81406f477f6fb4f6a9578b45e31287905dc75e6 | |
parent | c86a304f8cf2526a8b947145ee764e87d4b63a7d (diff) | |
download | www-ba92c8890e27a502e795380246fddfe98dfb4b06.tar www-ba92c8890e27a502e795380246fddfe98dfb4b06.tar.gz www-ba92c8890e27a502e795380246fddfe98dfb4b06.tar.bz2 www-ba92c8890e27a502e795380246fddfe98dfb4b06.tar.xz www-ba92c8890e27a502e795380246fddfe98dfb4b06.zip |
Use Mageia-Archive on Distrib Coffe for removed release on main mirrors
-rw-r--r-- | mirrorlist/index.php | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/mirrorlist/index.php b/mirrorlist/index.php index d603c16e4..1631c64fe 100644 --- a/mirrorlist/index.php +++ b/mirrorlist/index.php @@ -24,7 +24,6 @@ $repo = get('repo'); $debug = get('debug'); $source = get('source'); - $arraycheck =array( 'release' => array('5', '6', '7', '8', 'cauldron'), 'arch' => array('i586', 'x86_64', 'SRPMS', 'armv5tl', 'armv7hl', 'aarch64'), @@ -32,6 +31,8 @@ $arraycheck =array( 'repo' => array('release', 'updates', 'updates_testing', 'backports', 'backports_testing'), ); +$archives = array('5', '6'); + if ($source){ $link = "MIRROR/distrib/$release/SRPMS/$section/$repo/"; }elseif ($debug){ @@ -40,13 +41,20 @@ if ($source){ $link = "MIRROR/distrib/$release/$arch/media/$section/$repo/"; } + + if ($release && $arch && $section && $repo){ $out = check($arraycheck); + if (empty($out)){ - $wsd = new Downloads(); - $dl = $wsd->prepare_download(true, null, true, false, true); - foreach ($dl['mirrors_list'] as $one_mirror) { - $out .= str_replace('MIRROR', $one_mirror, $link) . "\n"; + if (!in_array($release, $archives)){ + $wsd = new Downloads(); + $dl = $wsd->prepare_download(true, null, true, false, true); + foreach ($dl['mirrors_list'] as $one_mirror) { + $out .= str_replace('MIRROR', $one_mirror, $link) . "\n"; + } + } else { + $out = str_replace('MIRROR', "http://distrib-coffee.ipsl.jussieu.fr/pub/linux/Mageia-archive", $link); } } }else{ |