From e4207f63d0deba6cf1a517803dbe3189ccebdaa6 Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Tue, 22 Sep 2020 13:28:12 +0200 Subject: [PATCH] Do not block the installation of not yet installed projects Fixes #3572 This commit rectifies the change in d70a577df3662d168612e40035a4237c19bed5b0 --- .../install/files/acp/templates/devtoolsProjectSync.tpl | 6 ++++-- .../lib/data/devtools/project/DevtoolsProject.class.php | 6 +++++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/wcfsetup/install/files/acp/templates/devtoolsProjectSync.tpl b/wcfsetup/install/files/acp/templates/devtoolsProjectSync.tpl index dd439174e7..74fc4f5378 100644 --- a/wcfsetup/install/files/acp/templates/devtoolsProjectSync.tpl +++ b/wcfsetup/install/files/acp/templates/devtoolsProjectSync.tpl @@ -114,10 +114,12 @@ overflow: hidden; } - - {include file='__devtoolsProjectInstallationJavaScript'} {else}

{@$object->validate()}

{/if} +{if $object->validate(true) === ''} + {include file='__devtoolsProjectInstallationJavaScript'} +{/if} + {include file='footer'} 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 ec181bdb84..db5e001a20 100644 --- a/wcfsetup/install/files/lib/data/devtools/project/DevtoolsProject.class.php +++ b/wcfsetup/install/files/lib/data/devtools/project/DevtoolsProject.class.php @@ -72,13 +72,17 @@ class DevtoolsProject extends DatabaseObject { * Validates the repository and returns the first error message, or * an empty string on success. * + * @param boolean $pathOnly * @return string */ - public function validate() { + public function validate($pathOnly = false) { $errorType = self::validatePath($this->path); if ($errorType !== '') { return WCF::getLanguage()->get('wcf.acp.devtools.project.path.error.' . $errorType); } + else if ($pathOnly) { + return ''; + } return $this->validatePackageXml(); } -- 2.20.1