diff options
author | Manuel Hiebel <leuhmanu@mageia.org> | 2016-06-01 21:48:14 +0200 |
---|---|---|
committer | Manuel Hiebel <leuhmanu@mageia.org> | 2016-06-01 21:48:14 +0200 |
commit | 161de866db2d4383643405041dd2f5bdf844f8fb (patch) | |
tree | 54cdff6c8d284456140f68eb5f489b432fdcc368 | |
parent | 501bc64d8b0754c13da1145bc3ac267784a561ce (diff) | |
download | www-161de866db2d4383643405041dd2f5bdf844f8fb.tar www-161de866db2d4383643405041dd2f5bdf844f8fb.tar.gz www-161de866db2d4383643405041dd2f5bdf844f8fb.tar.bz2 www-161de866db2d4383643405041dd2f5bdf844f8fb.tar.xz www-161de866db2d4383643405041dd2f5bdf844f8fb.zip |
fix select of right cached list
even on website it was not the right used for dl (alternate mirror)
-rw-r--r-- | en/downloads/get/lib.php | 2 | ||||
-rw-r--r-- | lib/Downloads.php | 12 |
2 files changed, 7 insertions, 7 deletions
diff --git a/en/downloads/get/lib.php b/en/downloads/get/lib.php index cb15c423d..5894ad902 100644 --- a/en/downloads/get/lib.php +++ b/en/downloads/get/lib.php @@ -136,7 +136,7 @@ function get_mirrors_for($file, $locale = null, $country = null, $prod = true, $ $mirrors = Downloads::get_all_mirrors($prod, $documentation); $wsd = new Downloads(); - $one = $wsd->prepare_download(true, $country); + $one = $wsd->prepare_download(true, $country, $prod, $documentation); return array($one, $mirrors); } 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 |