From 5cf210c9459bd601c5d4291786f595e711daa009 Mon Sep 17 00:00:00 2001 From: Romain d'Alverny Date: Tue, 5 Apr 2011 20:37:55 +0000 Subject: add torrent links (tmb) --- en/downloads/dl.php | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) (limited to 'en') diff --git a/en/downloads/dl.php b/en/downloads/dl.php index 635f73eea..1ca6ccef5 100644 --- a/en/downloads/dl.php +++ b/en/downloads/dl.php @@ -32,10 +32,21 @@ $product_iso = $product . '.iso'; $wsd = new Downloads('en', null); $a = $wsd->prepare_download(null, true); -if (isset($p['path'])) - $dl_link = sprintf('%s/%s', $a['mirror_url'], $p['path']); -else - $dl_link = sprintf('%s/%s/%s', $a['mirror_url'], 'iso/cauldron', $product_iso); +if ($torrent) { + if (isset($p['torrent'])) { + $dl_link = sprintf('%s/%s', $a['mirror_url'], $p['torrent']); + } + else { + header('Location: /downloads/'); + die; + } +} +else { + if (isset($p['path'])) + $dl_link = sprintf('%s/%s', $a['mirror_url'], $p['path']); + else + $dl_link = sprintf('%s/%s/%s', $a['mirror_url'], 'iso/cauldron', $product_iso); +} // @fixme (rda) actually, http-equiv="refresh" is deprecated behaviour now. // @fixme (rda) see http://www.w3.org/TR/WCAG10-HTML-TECHS/#meta-element -- cgit v1.2.1