From 161de866db2d4383643405041dd2f5bdf844f8fb Mon Sep 17 00:00:00 2001 From: Manuel Hiebel Date: Wed, 1 Jun 2016 21:48:14 +0200 Subject: fix select of right cached list even on website it was not the right used for dl (alternate mirror) --- lib/Downloads.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'lib') diff --git a/lib/Downloads.php b/lib/Downloads.php index 71821b490..9ea8ec756 100644 --- a/lib/Downloads.php +++ b/lib/Downloads.php @@ -211,9 +211,9 @@ class Downloads * * @return array */ - function get_mirror($country, $continent = null) + function get_mirror($country, $continent = null, $prod = true, $documentation = false, $mirrorlist = false) { - $mirs = self::get_all_mirrors(); + $mirs = self::get_all_mirrors($prod, $documentation, $mirrorlist); $continent = '_C:' . $continent; $mirrors = array(); @@ -257,9 +257,9 @@ class Downloads return $one_mirror; } - function prepare_download($force = false, $country = null) + function prepare_download($force = false, $country = null, $prod = true, $documentation = false, $mirrorlist = false) { - return $this->get_one_mirror($force, $country); + return $this->get_one_mirror($force, $country, $prod, $documentation, $mirrorlist); } /** @@ -271,7 +271,7 @@ class Downloads * * TODO extract as much as possible $_SESSION(read) and $_SERVER and $_GET */ - function get_one_mirror($force = false, $country = null) + function get_one_mirror($force = false, $country = null, $prod = true, $documentation = false, $mirrorlist = false) { $fuzzy_mirror = false; @@ -329,7 +329,7 @@ class Downloads $_SESSION['continent'] = $continent; } - $mirror = $this->get_mirror($country, $continent); + $mirror = $this->get_mirror($country, $continent, $prod, $documentation, $mirrorlist); $mirror['purl'] = parse_url($mirror['url']); // reassign country, as get_one_mirror() may have decided -- cgit v1.2.1