From f6aa74c264bc40bea1641bf8ff2ef29afe541ff4 Mon Sep 17 00:00:00 2001 From: Zack Spear Date: Thu, 20 Mar 2025 14:52:29 -0700 Subject: [PATCH] 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. --- emhttp/plugins/dynamix.my.servers/Registration.page | 5 ++++- emhttp/plugins/dynamix.plugin.manager/Downgrade.page | 5 +++-- emhttp/plugins/dynamix.plugin.manager/Update.page | 4 ++++ emhttp/plugins/dynamix.plugin.manager/scripts/unraidcheck | 7 +++++-- 4 files changed, 16 insertions(+), 5 deletions(-) diff --git a/emhttp/plugins/dynamix.my.servers/Registration.page b/emhttp/plugins/dynamix.my.servers/Registration.page index 8aa41be25..812ed720b 100644 --- a/emhttp/plugins/dynamix.my.servers/Registration.page +++ b/emhttp/plugins/dynamix.my.servers/Registration.page @@ -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); ?> - + \ No newline at end of file diff --git a/emhttp/plugins/dynamix.plugin.manager/Downgrade.page b/emhttp/plugins/dynamix.plugin.manager/Downgrade.page index 0019b5167..037740ac6 100644 --- a/emhttp/plugins/dynamix.plugin.manager/Downgrade.page +++ b/emhttp/plugins/dynamix.plugin.manager/Downgrade.page @@ -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']))); diff --git a/emhttp/plugins/dynamix.plugin.manager/Update.page b/emhttp/plugins/dynamix.plugin.manager/Update.page index 82d0d337c..c3a5e52e6 100644 --- a/emhttp/plugins/dynamix.plugin.manager/Update.page +++ b/emhttp/plugins/dynamix.plugin.manager/Update.page @@ -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(); ?> diff --git a/emhttp/plugins/dynamix.plugin.manager/scripts/unraidcheck b/emhttp/plugins/dynamix.plugin.manager/scripts/unraidcheck index bb87f6343..787c9b49c 100755 --- a/emhttp/plugins/dynamix.plugin.manager/scripts/unraidcheck +++ b/emhttp/plugins/dynamix.plugin.manager/scripts/unraidcheck @@ -13,7 +13,10 @@ ?> check(); +require_once "$docroot/plugins/dynamix.plugin.manager/include/UnraidCheck.php"; $unraidOsCheck = new UnraidOsCheck(); -$unraidOsCheck->checkForUpdate(); +$unraidOsCheck->checkForUpdate(); \ No newline at end of file