aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorManuel Hiebel <leuhmanu@mageia.org>2016-06-01 21:48:14 +0200
committerManuel Hiebel <leuhmanu@mageia.org>2016-06-01 21:48:14 +0200
commit161de866db2d4383643405041dd2f5bdf844f8fb (patch)
tree54cdff6c8d284456140f68eb5f489b432fdcc368 /lib
parent501bc64d8b0754c13da1145bc3ac267784a561ce (diff)
downloadwww-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)
Diffstat (limited to 'lib')
-rw-r--r--lib/Downloads.php12
1 files changed, 6 insertions, 6 deletions
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