diff options
Diffstat (limited to 'en')
-rw-r--r-- | en/downloads/dl.php | 19 |
1 files changed, 15 insertions, 4 deletions
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 |