From a7034b4dddb139afa2094210bbd9d898ad029d8e Mon Sep 17 00:00:00 2001 From: Matthias Schmidt Date: Mon, 26 Apr 2021 16:32:07 +0200 Subject: [PATCH] Fix handling of standalone instruction attribute in DevTools --- .../Acp/Form/Builder/Field/Devtools/Project/Instructions.ts | 2 +- .../Acp/Form/Builder/Field/Devtools/Project/Instructions.js | 2 +- .../devtools/package/DevtoolsPackageXmlWriter.class.php | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) 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] !== "" ) { -- 2.20.1