From e8c7ad862ec6ee63bac5178a3dffa7959b70d1e6 Mon Sep 17 00:00:00 2001 From: Manuel Hiebel Date: Sat, 17 Feb 2018 22:12:32 +0100 Subject: Show that previous are obsolete on last download page +remove magnet link from not torrent url --- en/downloads/get/index.php | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'en/downloads/get/index.php') diff --git a/en/downloads/get/index.php b/en/downloads/get/index.php index 62674f79d..6048bc149 100644 --- a/en/downloads/get/index.php +++ b/en/downloads/get/index.php @@ -201,6 +201,9 @@ if (!$download) { if(!isset($product['magnet'])) { $product['magnet'] = null; } +if(!isset($product['obsolete'])) { + $product['obsolete'] = null ; +} preg_match("/\D*(\d+.*)/", $product['size'], $product_size); if ($debug) $js_redirect = null; @@ -227,11 +230,18 @@ if (!isset($_SERVER['APP_MODE']) || $_SERVER['APP_MODE'] == 'prod') {

'; + _g('Warning !', null, 'h4'); + _g('This file is obsolete, please download the lastest version.', 'href="../" class="alert-link"', 'p'); + echo '

'; +} echo sprintf(_r('Your download of %s should start within a few seconds'), '' . $product['name'] . '' . ($torrent ? ' (torrent)' : '')), ' ', sprintf(_r('(download size is about %s).'), $product_size[1]), ' ', sprintf(_r('If the download does not start, click here.'), $download, $download), - sprintf( '%s', ($product['magnet'] ? ' | Magnet' : '' )); + sprintf( '%s', ($product['magnet'] && $torrent ? ' | Magnet' : '' )); ?>

-- cgit v1.2.1