aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mirrorlist/index.php15
1 files changed, 9 insertions, 6 deletions
diff --git a/mirrorlist/index.php b/mirrorlist/index.php
index 69614a769..dd8e3269b 100644
--- a/mirrorlist/index.php
+++ b/mirrorlist/index.php
@@ -1,7 +1,6 @@
<?php
require realpath(__DIR__ . '/../lib/Downloads.php');
-require realpath(__DIR__ . '/../lib/mga_geoip.php');
function get($s){
return $string_var = (string) filter_input(INPUT_GET, $s, FILTER_SANITIZE_STRING);
@@ -14,9 +13,9 @@ $getvar = get("$key");
$list = implode(", ", $v);
if (in_array($getvar, $v)) {
- $out = array($key => $getvar);
+ //$out = array($key => $getvar);
}else{
- $out = array("Error" => "Error $key: $getvar - not in list - $list");
+ $out = "Error $key: $getvar - not in list - $list";
break;
}
}
@@ -55,11 +54,15 @@ if ($source){
if ($release && $arch && $section && $repo){
- $out = str_replace('MIRROR', $dl['mirror_url'], $link);
- //$out = check($arraycheck);
+ $oute = check($arraycheck);
+ $out= str_replace('MIRROR', $dl['mirror_url'], $link);
//print_r($out);
}else{
$out = "Invalid options";
}
-echo $out;
+if ($oute){
+ echo $oute;}
+else{
+ echo $out;
+}