aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--en/downloads/get/lib.php2
-rw-r--r--lib/Downloads.php12
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