aboutsummaryrefslogtreecommitdiffstats
path: root/mirrorlist
diff options
context:
space:
mode:
Diffstat (limited to 'mirrorlist')
-rw-r--r--mirrorlist/index.php19
1 files changed, 8 insertions, 11 deletions
diff --git a/mirrorlist/index.php b/mirrorlist/index.php
index dd8e3269b..070e4d3cb 100644
--- a/mirrorlist/index.php
+++ b/mirrorlist/index.php
@@ -33,8 +33,6 @@ $repo = get('repo');
$debug = get('debug');
$source = get('source');
-$wsd = new Downloads();
-$dl = $wsd->prepare_download(true, null);
$arraycheck =array(
'release' => array('5', '6', 'cauldron'),
@@ -54,15 +52,14 @@ if ($source){
if ($release && $arch && $section && $repo){
- $oute = check($arraycheck);
- $out= str_replace('MIRROR', $dl['mirror_url'], $link);
- //print_r($out);
+ $out = check($arraycheck);
+ if (!$out){
+ $wsd = new Downloads();
+ $dl = $wsd->prepare_download(true, null);
+ $out= str_replace('MIRROR', $dl['mirror_url'], $link);
+ //print_r($out);
+ }
}else{
$out = "Invalid options";
}
-if ($oute){
- echo $oute;}
-else{
- echo $out;
-}
-
+echo $out;