aboutsummaryrefslogtreecommitdiffstats
path: root/en
diff options
context:
space:
mode:
authorRomain d'Alverny <rda@mageia.org>2011-04-05 20:37:55 +0000
committerRomain d'Alverny <rda@mageia.org>2011-04-05 20:37:55 +0000
commit5cf210c9459bd601c5d4291786f595e711daa009 (patch)
tree266920431e88855ba3de2c0d2866fbe88e74b195 /en
parent0a7b2c6184d7b8cf82f6b374734c29b49c85a4f6 (diff)
downloadwww-5cf210c9459bd601c5d4291786f595e711daa009.tar
www-5cf210c9459bd601c5d4291786f595e711daa009.tar.gz
www-5cf210c9459bd601c5d4291786f595e711daa009.tar.bz2
www-5cf210c9459bd601c5d4291786f595e711daa009.tar.xz
www-5cf210c9459bd601c5d4291786f595e711daa009.zip
add torrent links (tmb)
Diffstat (limited to 'en')
-rw-r--r--en/downloads/dl.php19
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