From e25e4fcb8927a2831e756baf119cfe5f467a00c8 Mon Sep 17 00:00:00 2001 From: filip Date: Thu, 19 May 2016 00:26:48 +0200 Subject: adding signature links + refresh i19n --- en/downloads/get/index.php | 37 +++++++++++++++++-------------------- 1 file changed, 17 insertions(+), 20 deletions(-) (limited to 'en/downloads/get/index.php') diff --git a/en/downloads/get/index.php b/en/downloads/get/index.php index 2b7cfed17..43c415c21 100644 --- a/en/downloads/get/index.php +++ b/en/downloads/get/index.php @@ -234,15 +234,20 @@ if (!isset($_SERVER['APP_MODE']) || $_SERVER['APP_MODE'] == 'prod') { $checksums = array('md5', 'sha1', 'sha512'); $sum_links = array(); $chksm_cmd = ''; +$sig_links = array(); foreach ($checksums as $checksum) { - if (array_key_exists($checksum, $product)) { - $sum_links[] = '' . basename($download) . '.' . $checksum . ''; + if (isset($product[$checksum])) { + $sum_links[] = "" . basename($download) . ".$checksum"; $chksm_cmd .= '$ ' . $checksum . 'sum ' . basename($download) . "\n" . $product[$checksum] . "\n" . PHP_EOL; + if (isset($product["$checksum.gpg"])) { + $sig_links[] = "" . basename($download) . ".$checksum.gpg"; + } } } ?> 0 && !$torrent) { _g('As soon as your download is complete, you should check that the checksums match:', null, 'p'); echo PHP_EOL . '
' . PHP_EOL; @@ -250,25 +255,16 @@ if ($num_checksums > 0 && !$torrent) { echo $chksm_cmd; echo '' . PHP_EOL . '

'; _g('If checksums do not match, DO NOT use this ISO. Double-check and try to download again.', null, ' '); - $checksum_links = ''; - $list_sign = _r(',', ' '); - foreach ($sum_links as $checksum_link) { - $checksum_links .= $checksum_link; - if ($num_checksums == 2) { - $list_sign = ' ' . _r('and', ' '); - } else if ($num_checksums == 1) { - $list_sign = ''; - } - $checksum_links .= $list_sign; - $num_checksums--; - } - _g('Checksums are available for download as files', null, ' '); + $checksum_links = array_to_list($sum_links, ' ' . _r('and', ' '), _r(',', ' ')); + $signature_links = array_to_list($sig_links, ' ' . _r('and', ' '), _r(',', ' ')); + _g('Checksums are available for download as files:', null, ' '); echo "$checksum_links.

"; -// } - ?> + 0) { // only output if there are any signatures files present ?>

MIT PGP Public Key Server:'), 'https://pgp.mit.edu/'); ?>

+_g('They are also available for download as files:', null, ' '); +echo "$signature_links. "; +echo sprintf(_r('First you need to import the "Mageia Release" key from a MIT PGP Public Key Server:'), 'https://pgp.mit.edu/'); ?>

 $ gpg --keyserver pgp.mit.edu --recv-keys EDCA7A90
 
@@ -292,8 +288,9 @@ gpg: There is no indication that the signature belongs to the owner. Primary key fingerprint: B210 76A0 CBE4 D93D 66A9 D08D 835E 41F4 EDCA 7A90

+
- + -- cgit v1.2.1