diff options
author | Romain d'Alverny <rda@mageia.org> | 2011-04-05 20:37:55 +0000 |
---|---|---|
committer | Romain d'Alverny <rda@mageia.org> | 2011-04-05 20:37:55 +0000 |
commit | 5cf210c9459bd601c5d4291786f595e711daa009 (patch) | |
tree | 266920431e88855ba3de2c0d2866fbe88e74b195 /downloads.php | |
parent | 0a7b2c6184d7b8cf82f6b374734c29b49c85a4f6 (diff) | |
download | www-5cf210c9459bd601c5d4291786f595e711daa009.tar www-5cf210c9459bd601c5d4291786f595e711daa009.tar.gz www-5cf210c9459bd601c5d4291786f595e711daa009.tar.bz2 www-5cf210c9459bd601c5d4291786f595e711daa009.tar.xz www-5cf210c9459bd601c5d4291786f595e711daa009.zip |
add torrent links (tmb)
Diffstat (limited to 'downloads.php')
-rw-r--r-- | downloads.php | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/downloads.php b/downloads.php index 7076aa8d1..0286ce2e1 100644 --- a/downloads.php +++ b/downloads.php @@ -32,11 +32,10 @@ $tmpl = <<<T <td class="lang">%s</td> <td class="size">%s</td> <td class="link"><a href="%s" rel="nofollow">%s</a></td> - +<td class="link"><a href="%s" rel="nofollow">%s</a></td> </tr> T; //<td class="pop"><span class="pop_%s">%s</span></td> -//<td class="link"><a href="%s" rel="nofollow">%s</a></td> $s = ''; $glob = array_shift($prods); @@ -46,14 +45,17 @@ foreach ($prods as $k => $p) { $iso = sprintf('%s-%s', $glob['prefix'], $k); $dl_link = sprintf('/%s/downloads/dl.php?product=%s', $locale, $iso); - $bt_link = sprintf('/%s/downloads/dl.php?product=%s&torrent=1', $locale, $iso); + $bt_link = isset($p['torrent']) ? + sprintf('/%s/downloads/dl.php?product=%s&torrent=1', $locale, $iso) : + null; + $pop = rand(0,5); $s .= sprintf($tmpl, '', //($i == 0) ? ' class="reco"' : '', $p['name'], $p['lang'], $p['size'], //$pop, $pop, $dl_link, $_t['download'], - $bt_link, $_t['download']); + $bt_link, !is_null($bt_link) ? $_t['download'] : ''); $i++; } @@ -66,6 +68,7 @@ $dl_table = <<<T <th>{$_t['language']}</th> <th class="size">{$_t['size']}</th> <th>{$_t['link']}</th> + <th>BitTorrent</th> </tr> </thead> <tbody> |