From 28a114e7c0c1bab88c5c4ad04f8e91ce95eec7b4 Mon Sep 17 00:00:00 2001 From: Manuel Hiebel Date: Mon, 30 May 2016 12:48:18 +0200 Subject: Fir geiop constant, and fix geoip test on mirrorlist --- mirrorlist/index.php | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) (limited to 'mirrorlist') 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; -- cgit v1.2.1