From: Alexander Ebert Date: Fri, 3 Jun 2022 16:37:44 +0000 (+0200) Subject: Broken auth dialog for package update servers X-Git-Tag: 5.5.0_RC_1~6 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=6b16712f66c1422555d7f71919f89c4a2c8e66f1;p=GitHub%2FWoltLab%2FWCF.git Broken auth dialog for package update servers See https://www.woltlab.com/community/thread/295831-fehler-beim-update-beta-3-4/ --- diff --git a/ts/WoltLabSuite/Core/Acp/Ui/Package/Update/Manager.ts b/ts/WoltLabSuite/Core/Acp/Ui/Package/Update/Manager.ts index 4a54673937..e706e5813f 100644 --- a/ts/WoltLabSuite/Core/Acp/Ui/Package/Update/Manager.ts +++ b/ts/WoltLabSuite/Core/Acp/Ui/Package/Update/Manager.ts @@ -187,7 +187,10 @@ class AcpUiPackageUpdateManager implements DialogCallbackObject { } if (isValid) { - const packageUpdateServerID = +this.submitButton.dataset.packageUpdateServerId!; + const dialog = document.getElementById("acpUiPackageUpdateManager")!; + const submitButton = dialog.querySelector('button[data-type="submit"]') as HTMLElement; + + const packageUpdateServerID = parseInt(submitButton.dataset.packageUpdateServerId!, 10); const saveCredentials = (document.getElementById("packageUpdateServerSaveCredentials") as HTMLInputElement) .checked; diff --git a/wcfsetup/install/files/js/WoltLabSuite/Core/Acp/Ui/Package/Update/Manager.js b/wcfsetup/install/files/js/WoltLabSuite/Core/Acp/Ui/Package/Update/Manager.js index abe0d4593a..c8dd6bb9dd 100644 --- a/wcfsetup/install/files/js/WoltLabSuite/Core/Acp/Ui/Package/Update/Manager.js +++ b/wcfsetup/install/files/js/WoltLabSuite/Core/Acp/Ui/Package/Update/Manager.js @@ -129,7 +129,9 @@ define(["require", "exports", "tslib", "../../../../Ajax", "../../../../Language Util_1.default.innerError(passwordField, false); } if (isValid) { - const packageUpdateServerID = +this.submitButton.dataset.packageUpdateServerId; + const dialog = document.getElementById("acpUiPackageUpdateManager"); + const submitButton = dialog.querySelector('button[data-type="submit"]'); + const packageUpdateServerID = parseInt(submitButton.dataset.packageUpdateServerId, 10); const saveCredentials = document.getElementById("packageUpdateServerSaveCredentials") .checked; void this.prepareUpdate({