aboutsummaryrefslogtreecommitdiffstats
path: root/en/downloads/dl.php
diff options
context:
space:
mode:
authorRomain d'Alverny <rda@mageia.org>2011-11-23 22:52:04 +0000
committerRomain d'Alverny <rda@mageia.org>2011-11-23 22:52:04 +0000
commit48631ff7ba2b341e01b453aa9051c32dcaca0f67 (patch)
tree8cd614621cd82838bba06456c9312cf00156b4c0 /en/downloads/dl.php
parentaf132e14e2d2dbef1ed8b40246066deeb9544060 (diff)
downloadwww-48631ff7ba2b341e01b453aa9051c32dcaca0f67.tar
www-48631ff7ba2b341e01b453aa9051c32dcaca0f67.tar.gz
www-48631ff7ba2b341e01b453aa9051c32dcaca0f67.tar.bz2
www-48631ff7ba2b341e01b453aa9051c32dcaca0f67.tar.xz
www-48631ff7ba2b341e01b453aa9051c32dcaca0f67.zip
remove old vars and cleanup code
Diffstat (limited to 'en/downloads/dl.php')
-rw-r--r--en/downloads/dl.php9
1 files changed, 7 insertions, 2 deletions
diff --git a/en/downloads/dl.php b/en/downloads/dl.php
index 96ace397e..8afd487cb 100644
--- a/en/downloads/dl.php
+++ b/en/downloads/dl.php
@@ -6,6 +6,10 @@ $product = isset($_GET['product']) ? trim(strtolower($_GET['product'])) : null;
$torrent = isset($_GET['torrent']) ? true : false;
$mirror = isset($_GET['mirror']) ? trim(strtolower($_GET['mirror'])) : null;
+function get($s) {
+ return isset($_GET[$s]) ? trim($_GET[$s]) : null;
+}
+
define('HLANG', true);
require '../../langs.php';
require 'locales.php';
@@ -27,6 +31,7 @@ if (!is_null($product)) {
}
}
+// TODO: if (!is_valid_product($product, $productsList))
if (!$found) {
header('Location: /downloads/');
die;
@@ -36,8 +41,8 @@ include '../../lib/Downloads.php';
$g_mirrors = Downloads::get_all_mirrors();
$product_iso = $product . '.iso';
-$wsd = new Downloads($locale, null);
-$a = $wsd->prepare_download(null, true);
+$wsd = new Downloads();
+$a = $wsd->prepare_download(true, get('country'));
$product_dl_link = null;
if ($torrent) {