From d2cf7ba2e5bf484cbc3eeb1ed9803b17a4432013 Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Wed, 9 Oct 2024 16:04:57 +0200 Subject: [PATCH] Fix the handling of invalid packages Regression of 3855c176a98b93735521ea972f506eaea121ec10 See https://www.woltlab.com/community/thread/308418-beta-2-entwickler-tools-wollen-sie-das-paket-installieren-ohne-funktion/ --- .../install/files/acp/templates/devtoolsProjectSync.tpl | 2 +- .../lib/data/devtools/project/DevtoolsProject.class.php | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/wcfsetup/install/files/acp/templates/devtoolsProjectSync.tpl b/wcfsetup/install/files/acp/templates/devtoolsProjectSync.tpl index 40ebf9027c..3d46a433d9 100644 --- a/wcfsetup/install/files/acp/templates/devtoolsProjectSync.tpl +++ b/wcfsetup/install/files/acp/templates/devtoolsProjectSync.tpl @@ -149,7 +149,7 @@ {@$object->validate()} {/if} -{if $object->validate() === ''} +{if $object->validate(true) === '' && !$object->hasFailedPackageXmlValidation()} {include file='__devtoolsProjectInstallationJavaScript'} {/if} diff --git a/wcfsetup/install/files/lib/data/devtools/project/DevtoolsProject.class.php b/wcfsetup/install/files/lib/data/devtools/project/DevtoolsProject.class.php index 44b152f6cc..72223b42f8 100644 --- a/wcfsetup/install/files/lib/data/devtools/project/DevtoolsProject.class.php +++ b/wcfsetup/install/files/lib/data/devtools/project/DevtoolsProject.class.php @@ -238,6 +238,14 @@ class DevtoolsProject extends DatabaseObject $this->package = $package; } + /** + * @since 6.1 + */ + public function hasFailedPackageXmlValidation(): bool + { + return $this->packageValidationException !== null; + } + /** * Validates the provided path and returns an error code * if the path does not exist (`notFound`) or if there is -- 2.20.1