aboutsummaryrefslogtreecommitdiffstats
path: root/mirrorlist
diff options
context:
space:
mode:
authorManuel Hiebel <leuhmanu@mageia.org>2016-05-30 12:48:18 +0200
committerManuel Hiebel <leuhmanu@mageia.org>2016-05-30 12:48:18 +0200
commit28a114e7c0c1bab88c5c4ad04f8e91ce95eec7b4 (patch)
tree5a08c53fa036b83571d120165d69a446a1140726 /mirrorlist
parentebfe5b2aa7fc27df6c9aec3929edff632bf3c7dd (diff)
downloadwww-28a114e7c0c1bab88c5c4ad04f8e91ce95eec7b4.tar
www-28a114e7c0c1bab88c5c4ad04f8e91ce95eec7b4.tar.gz
www-28a114e7c0c1bab88c5c4ad04f8e91ce95eec7b4.tar.bz2
www-28a114e7c0c1bab88c5c4ad04f8e91ce95eec7b4.tar.xz
www-28a114e7c0c1bab88c5c4ad04f8e91ce95eec7b4.zip
Fir geiop constant, and fix geoip test on mirrorlist
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;