From: Alexander Ebert Date: Tue, 22 Sep 2020 11:28:12 +0000 (+0200) Subject: Do not block the installation of not yet installed projects X-Git-Tag: 5.3.0_Beta_1~7^2~2 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=e4207f63d0deba6cf1a517803dbe3189ccebdaa6;p=GitHub%2FWoltLab%2FWCF.git Do not block the installation of not yet installed projects Fixes #3572 This commit rectifies the change in d70a577df3662d168612e40035a4237c19bed5b0 --- 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(); }