From f3e6a0011ee1bfdd511648105836b94022845ae1 Mon Sep 17 00:00:00 2001 From: Zack Spear Date: Thu, 20 Mar 2025 11:50:20 -0700 Subject: [PATCH] feat: ReplaceKey functionality in Registration and Update pages (#1246) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Handles auto-extensions key check and install of extend license key with new OS Updates Expiration date Related to https://github.com/unraid/webgui/pull/2071 but not 100% dependent on them. @elibosley, do we want to use the `force` param on the `check()` method for either of these pages? Additionally, what do you think about any potential integration with `UnraidCheck.php` – which is used for the UPC's "Check for Updates" button and the user configured automatically scheduled update check? ## Summary by CodeRabbit - **New Features** - Enhanced plugin registration and update processes with an integrated key validation step that verifies system parameters automatically. --- - To see the specific tasks where the Asana app for GitHub is being used, see below: - https://app.asana.com/0/0/1209573221367688 --- .../local/emhttp/plugins/dynamix.my.servers/Registration.page | 3 +++ .../local/emhttp/plugins/dynamix.plugin.manager/Update.page | 3 +++ 2 files changed, 6 insertions(+) diff --git a/plugin/source/dynamix.unraid.net/usr/local/emhttp/plugins/dynamix.my.servers/Registration.page b/plugin/source/dynamix.unraid.net/usr/local/emhttp/plugins/dynamix.my.servers/Registration.page index 8aa41be25..9689371e6 100644 --- a/plugin/source/dynamix.unraid.net/usr/local/emhttp/plugins/dynamix.my.servers/Registration.page +++ b/plugin/source/dynamix.unraid.net/usr/local/emhttp/plugins/dynamix.my.servers/Registration.page @@ -14,6 +14,9 @@ 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(); ?> diff --git a/plugin/source/dynamix.unraid.net/usr/local/emhttp/plugins/dynamix.plugin.manager/Update.page b/plugin/source/dynamix.unraid.net/usr/local/emhttp/plugins/dynamix.plugin.manager/Update.page index 82d0d337c..e7d15c474 100644 --- a/plugin/source/dynamix.unraid.net/usr/local/emhttp/plugins/dynamix.plugin.manager/Update.page +++ b/plugin/source/dynamix.unraid.net/usr/local/emhttp/plugins/dynamix.plugin.manager/Update.page @@ -14,7 +14,10 @@ Tag="upload" * all copies or substantial portions of the Software. */ require_once "$docroot/plugins/dynamix.my.servers/include/reboot-details.php"; +require_once "$docroot/plugins/dynamix/include/ReplaceKey.php"; $rebootDetails = new RebootDetails(); +$replaceKey = new ReplaceKey(); +$replaceKey->check(); ?>