Do not block the installation of not yet installed projects
authorAlexander Ebert <ebert@woltlab.com>
Tue, 22 Sep 2020 11:28:12 +0000 (13:28 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Tue, 22 Sep 2020 11:28:12 +0000 (13:28 +0200)
Fixes #3572

This commit rectifies the change in d70a577df3662d168612e40035a4237c19bed5b0

wcfsetup/install/files/acp/templates/devtoolsProjectSync.tpl
wcfsetup/install/files/lib/data/devtools/project/DevtoolsProject.class.php

index dd439174e793c5176e8f4c3c75a93f3a8caac579..74fc4f537862ce0d49382dab1495041466dccea8 100644 (file)
                        overflow: hidden;
                }
        </style>
-       
-       {include file='__devtoolsProjectInstallationJavaScript'}
 {else}
        <p class="error">{@$object->validate()}</p>
 {/if}
 
+{if $object->validate(true) === ''}
+       {include file='__devtoolsProjectInstallationJavaScript'}
+{/if}
+
 {include file='footer'}
index ec181bdb84c2f55533c0d92f1790a08669e4b9bd..db5e001a20e3b524a1fb8126f5317515f7e4ff2e 100644 (file)
@@ -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();
        }