aboutsummaryrefslogtreecommitdiffstats
path: root/en/downloads/get/index.php
diff options
context:
space:
mode:
authorManuel Hiebel <leuhmanu@mageia.org>2018-02-17 22:12:32 +0100
committerManuel Hiebel <leuhmanu@mageia.org>2018-02-17 22:12:32 +0100
commite8c7ad862ec6ee63bac5178a3dffa7959b70d1e6 (patch)
tree3d58cb765f65dd7b42e65400571d329a4b67b541 /en/downloads/get/index.php
parent39a589a9fdd7701640fdb904e2333743b188b9d2 (diff)
downloadwww-e8c7ad862ec6ee63bac5178a3dffa7959b70d1e6.tar
www-e8c7ad862ec6ee63bac5178a3dffa7959b70d1e6.tar.gz
www-e8c7ad862ec6ee63bac5178a3dffa7959b70d1e6.tar.bz2
www-e8c7ad862ec6ee63bac5178a3dffa7959b70d1e6.tar.xz
www-e8c7ad862ec6ee63bac5178a3dffa7959b70d1e6.zip
Show that previous are obsolete on last download page
+remove magnet link from not torrent url
Diffstat (limited to 'en/downloads/get/index.php')
-rw-r--r--en/downloads/get/index.php12
1 files changed, 11 insertions, 1 deletions
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') {
<?php if (!is_null($download)): ?>
<div class="yui-g"><div class="para" style="padding-top: 2em;">
<p><?php
+
+if($product['obsolete']) {
+ echo '<div class="alert alert-danger" role="alert">';
+ _g('Warning !', null, 'h4');
+ _g('This file is obsolete, please <a %s>download</a> the lastest version.', 'href="../" class="alert-link"', 'p');
+ echo '</div>';
+}
echo
sprintf(_r('Your download of %s should start within a few seconds'), '<em class="tag">' . $product['name'] . '</em>' . ($torrent ? ' (torrent)' : '')),
' ', sprintf(_r('(download size is about %s).'), $product_size[1]),
' ', sprintf(_r('If the download does not start, <a href="%s" rel="nofollow" title="%s">click here</a>.'), $download, $download),
- sprintf( '%s', ($product['magnet'] ? ' | <a href="' . $product['magnet'] .'">Magnet</a>' : '' ));
+ sprintf( '%s', ($product['magnet'] && $torrent ? ' | <a href="' . $product['magnet'] .'">Magnet</a>' : '' ));
?></p>
<div class="dlinfo">