From: Matthias Schmidt Date: Mon, 26 Apr 2021 14:32:07 +0000 (+0200) Subject: Fix handling of standalone instruction attribute in DevTools X-Git-Tag: 5.4.0_Alpha_1~43 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=a7034b4dddb139afa2094210bbd9d898ad029d8e;p=GitHub%2FWoltLab%2FWCF.git Fix handling of standalone instruction attribute in DevTools --- diff --git a/ts/WoltLabSuite/Core/Acp/Form/Builder/Field/Devtools/Project/Instructions.ts b/ts/WoltLabSuite/Core/Acp/Form/Builder/Field/Devtools/Project/Instructions.ts index 2c4f36975e..417a5e98e2 100644 --- a/ts/WoltLabSuite/Core/Acp/Form/Builder/Field/Devtools/Project/Instructions.ts +++ b/ts/WoltLabSuite/Core/Acp/Form/Builder/Field/Devtools/Project/Instructions.ts @@ -187,7 +187,7 @@ class Instructions { listItem.dataset.instructionId = instructionId.toString(); listItem.dataset.application = instructionData.application; listItem.dataset.pip = instructionData.pip; - listItem.dataset.runStandalone = instructionData.runStandalone ? "true" : "false"; + listItem.dataset.runStandalone = instructionData.runStandalone ? "1" : "0"; listItem.dataset.value = instructionData.value; let content = ` diff --git a/wcfsetup/install/files/js/WoltLabSuite/Core/Acp/Form/Builder/Field/Devtools/Project/Instructions.js b/wcfsetup/install/files/js/WoltLabSuite/Core/Acp/Form/Builder/Field/Devtools/Project/Instructions.js index 044d0af317..7437662066 100644 --- a/wcfsetup/install/files/js/WoltLabSuite/Core/Acp/Form/Builder/Field/Devtools/Project/Instructions.js +++ b/wcfsetup/install/files/js/WoltLabSuite/Core/Acp/Form/Builder/Field/Devtools/Project/Instructions.js @@ -106,7 +106,7 @@ define(["require", "exports", "tslib", "../../../../../../Core", "../../../../.. listItem.dataset.instructionId = instructionId.toString(); listItem.dataset.application = instructionData.application; listItem.dataset.pip = instructionData.pip; - listItem.dataset.runStandalone = instructionData.runStandalone ? "true" : "false"; + listItem.dataset.runStandalone = instructionData.runStandalone ? "1" : "0"; listItem.dataset.value = instructionData.value; let content = `
diff --git a/wcfsetup/install/files/lib/system/devtools/package/DevtoolsPackageXmlWriter.class.php b/wcfsetup/install/files/lib/system/devtools/package/DevtoolsPackageXmlWriter.class.php index 69bf84c637..4360c2763d 100644 --- a/wcfsetup/install/files/lib/system/devtools/package/DevtoolsPackageXmlWriter.class.php +++ b/wcfsetup/install/files/lib/system/devtools/package/DevtoolsPackageXmlWriter.class.php @@ -173,7 +173,7 @@ class DevtoolsPackageXmlWriter foreach ($instructions['instructions'] as $instruction) { $attributes = ['type' => $instruction['pip']]; - if (!empty($instruction['runStandalone'])) { + if (!isset($instruction['runStandalone']) && $instruction['runStandalone'] !== "0") { $attributes['run'] = 'standalone'; } if (!empty($instruction['application'])) { @@ -248,7 +248,7 @@ class DevtoolsPackageXmlWriter ); } } - } else if ( + } elseif ( isset($this->packageXmlData[$information]) && $this->packageXmlData[$information] !== "" ) {