refactor: Downgrade class usage and clean up

This commit is contained in:
Zack Spear
2023-11-09 16:38:09 -08:00
parent caf7a0a558
commit 6e9ee59ac7

View File

@@ -7,8 +7,6 @@ Tag="upload"
require_once "$docroot/plugins/dynamix.my.servers/include/reboot-details.php";
// Create an instance of the RebootDetails class
$rebootDetails = new RebootDetails();
// Access the detected reboot type
$rebootVersion = $rebootDetails->getRebootVersion();
/**
* @note icon-update is rotated via CSS in myservers1.php
*
@@ -19,7 +17,6 @@ $rebootVersion = $rebootDetails->getRebootVersion();
$restoreVersion = $restoreBranch = $restoreVersionReleaseDate = 'unknown';
$restoreExists = file_exists('/boot/previous/bzroot');
$restoreChangelogPath = '/boot/previous/changes.txt';
$restoreChangelogContent = file_get_contents($restoreChangelogPath);
$serverNameEscaped = htmlspecialchars(str_replace(' ', '_', strtolower($var['NAME'])));
@@ -161,7 +158,7 @@ function confirmDowngrade() {
<unraid-i18n-host>
<unraid-downgrade-os
reboot-version="<?= $rebootVersion ?>"
reboot-version="<?= $rebootDetails->getRebootVersion() ?>"
restore-version="<?= $restoreExists && $restoreVersion != 'unknown' ? $restoreVersion : '' ?>"
restore-release-date="<?= $restoreExists && $restoreVersionReleaseDate != 'unknown' ? $restoreVersionReleaseDate : '' ?>"></unraid-downgrade-os>
</unraid-i18n-host>