From 48631ff7ba2b341e01b453aa9051c32dcaca0f67 Mon Sep 17 00:00:00 2001 From: Romain d'Alverny Date: Wed, 23 Nov 2011 22:52:04 +0000 Subject: remove old vars and cleanup code --- en/downloads/dl.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'en/downloads/dl.php') 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) { -- cgit v1.2.1