From aa60c992d6bc573f0fec7f5813fb5cd5814f57ec Mon Sep 17 00:00:00 2001 From: Tad Date: Sun, 14 Jun 2020 10:21:18 -0400 Subject: [PATCH] Add links to checksums --- pages/devices.html | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/pages/devices.html b/pages/devices.html index 3a648ecd..caafd5e0 100644 --- a/pages/devices.html +++ b/pages/devices.html @@ -82,6 +82,9 @@ if(strlen($file) > 30) { $zip = $file; $downloadButtons = "Download"; + if(file_exists($realRootdir . $device . "/" .$file . ".sha512sum")) { + $downloadButtons .= "512sum"; + } $latestFileTime = filemtime($realRootdir . $device . "/" .$file); break; } @@ -89,12 +92,18 @@ //Output the recovery.img $recovery = str_replace(".zip", "-recovery.img", $zip); if(strlen($recovery) > 36 && file_exists($realRootdir . $device . "/" . $recovery)) { - $downloadButtons .= "
Recovery"; + $downloadButtons .= "
Recovery"; + if(file_exists($realRootdir . $device . "/" . $recovery . ".sha512sum")) { + $downloadButtons .= "512sum"; + } } //Output the fastboot.zip $fastboot = str_replace(".zip", "-fastboot.zip", $zip); if(strlen($fastboot) > 36 && file_exists($realRootdir . $device . "/" . $fastboot)) { - $downloadButtons .= "
Fastboot"; + $downloadButtons .= "
Fastboot"; + if(file_exists($realRootdir . $device . "/" . $fastboot . ".sha512sum")) { + $downloadButtons .= "512sum"; + } } $outdated = !(($latestFileTime >= $lastSecRelease) && (($curTime - $latestFileTime) <= 3456000)); list($color, $statusMessage) = getStatus(file_get_contents($realRootdir . $device . "/status"), $outdated);