feat: Integrate ReplaceKey functionality across multiple pages

* Added `ReplaceKey` initialization and check to `Registration.page`, `Downgrade.page`, `Update.page`, and `unraidcheck` script.
* Ensures consistent handling of key replacement across relevant components.
This commit is contained in:
Zack Spear
2025-03-20 14:52:29 -07:00
parent 1768d77c31
commit f6aa74c264
4 changed files with 16 additions and 5 deletions

View File

@@ -14,7 +14,10 @@ Tag="pencil"
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*/
require_once "$docroot/plugins/dynamix/include/ReplaceKey.php";
$replaceKey = new ReplaceKey();
$replaceKey->check(true);
?>
<unraid-i18n-host>
<unraid-registration></unraid-registration>
</unraid-i18n-host>
</unraid-i18n-host>

View File

@@ -16,11 +16,12 @@ Tag="upload"
/**
* @note icon-update is rotated via CSS in myservers1.php
*/
require_once "$docroot/plugins/dynamix/include/ReplaceKey.php";
$replaceKey = new ReplaceKey();
$replaceKey->check();
require_once "$docroot/plugins/dynamix.my.servers/include/reboot-details.php";
// Create an instance of the RebootDetails class
$rebootDetails = new RebootDetails();
// Get the current reboot details if there are any
$rebootDetails->setPrevious();
$serverNameEscaped = htmlspecialchars(str_replace(' ', '_', strtolower($var['NAME'])));

View File

@@ -13,6 +13,10 @@ Tag="upload"
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*/
require_once "$docroot/plugins/dynamix/include/ReplaceKey.php";
$replaceKey = new ReplaceKey();
$replaceKey->check();
require_once "$docroot/plugins/dynamix.my.servers/include/reboot-details.php";
$rebootDetails = new RebootDetails();
?>

View File

@@ -13,7 +13,10 @@
?>
<?
$docroot ??= ($_SERVER['DOCUMENT_ROOT'] ?: '/usr/local/emhttp');
require_once "$docroot/plugins/dynamix.plugin.manager/include/UnraidCheck.php";
require_once "$docroot/plugins/dynamix/include/ReplaceKey.php";
$replaceKey = new ReplaceKey();
$replaceKey->check();
require_once "$docroot/plugins/dynamix.plugin.manager/include/UnraidCheck.php";
$unraidOsCheck = new UnraidOsCheck();
$unraidOsCheck->checkForUpdate();
$unraidOsCheck->checkForUpdate();