diff options
Diffstat (limited to 'mirrorlist/index.php')
-rw-r--r-- | mirrorlist/index.php | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/mirrorlist/index.php b/mirrorlist/index.php index b3c5ee084..d213606df 100644 --- a/mirrorlist/index.php +++ b/mirrorlist/index.php @@ -24,14 +24,15 @@ $repo = get('repo'); $debug = get('debug'); $source = get('source'); - $arraycheck =array( -'release' => array('5', '6', '7', 'cauldron'), -'arch' => array('i586', 'x86_64', 'SRPMS', 'armv5tl', 'armv7hl', 'aarch64'), +'release' => array('5', '6', '7', '8', '9', 'cauldron'), +'arch' => array('i586', 'i686', 'x86_64', 'SRPMS', 'armv5tl', 'armv7hl', 'aarch64'), 'section' => array('core', 'nonfree', 'tainted'), 'repo' => array('release', 'updates', 'updates_testing', 'backports', 'backports_testing'), ); +$archives = array('5', '6', '7'); + 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{ |