From 903738ba033082cd9b8671dffc4ec83f11afffe3 Mon Sep 17 00:00:00 2001
From: filip
Date: Sat, 6 Mar 2021 19:21:04 +0100
Subject: compare checksum directly without checksum file
---
en/downloads/get/index.php | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
(limited to 'en/downloads/get')
diff --git a/en/downloads/get/index.php b/en/downloads/get/index.php
index 1c9b93f23..b8fa0db10 100644
--- a/en/downloads/get/index.php
+++ b/en/downloads/get/index.php
@@ -261,14 +261,19 @@ $checksum_specifics = array(
);
$sum_links = array();
$chksm_cmd = '';
+$chksm_cmd_2 = '';
$sig_links = array();
foreach (array_keys($checksum_specifics) as $checksum) {
if (isset($product[$checksum])) {
$each_checksum = "" . basename($download) . '.' . $checksum . ' (' . $checksum_specifics[$checksum][1] . ')';
$sum_links[] = $each_checksum;
- $chksm_cmd .= '$ ' . $checksum_specifics[$checksum][0] . ' -c ' . basename($download) . '.' . $checksum . ' # ' . _r('You need both iso and checksum file in the same folder');
+ $chksm_cmd_pre_text = "$ # " . _r('You need both iso and checksum file in the same folder') . "\n";
+ $chksm_cmd .= "$ " . $checksum_specifics[$checksum][0] . ' -c ' . basename($download) . '.' . $checksum;
$chksm_cmd .= "\n" . basename($download) . ": " . _r("OK") . " \n" . PHP_EOL;
+ $chksm_cmd_mid_text = "$ # " . _r('You can also compare checksum directly from this web page without checksum file') . "\n";
+ $chksm_cmd_2 .= "$ " . $checksum_specifics[$checksum][0] . ' ' . basename($download);
+ $chksm_cmd_2 .= "\n" . $product[$checksum] . ' ' . basename($download) . " \n" . PHP_EOL;
if (isset($product["$checksum.gpg"])) {
$sig_links[] = "" . basename($download) . ".$checksum.gpg";
}
@@ -285,7 +290,7 @@ if ($num_checksums > 0 && !$torrent) {
echo "$checksum_links.
";
echo PHP_EOL . '' . PHP_EOL;
echo '
' . PHP_EOL;
- echo $chksm_cmd;
+ echo $chksm_cmd_pre_text . $chksm_cmd . $chksm_cmd_mid_text . $chksm_cmd_2;
echo '
' . PHP_EOL . '
';
_g('If checksums do not match, DO NOT use this ISO. Double-check and try to download again.', null, ' ');
$signature_links = array_to_list($sig_links, ' ' . _r('and', ' '), _r(',', ' '));
--
cgit v1.2.1