}
</style>
{else}
- <p class="error">{$object->validate()}</p>
+ <p class="error">{@$object->validate()}</p>
{/if}
{include file='footer'}
]);
}
+ $normalizeVersion = function($version) {
+ return preg_replace('~^(\d+)\.(\d+)\..*$~', '\\1.\\2', $version);
+ };
+
+ if ($normalizeVersion($this->packageArchive->getPackageInfo('version')) !== $normalizeVersion($this->package->packageVersion)) {
+ return WCF::getLanguage()->getDynamicVariable('wcf.acp.devtools.project.path.error.versionMismatch', [
+ 'version' => $this->packageArchive->getPackageInfo('version'),
+ 'packageVersion' => $this->package->packageVersion
+ ]);
+ }
+
+ if (!$this->isCore()) {
+ $hasValidExclude = false;
+ $foundCore = false;
+ foreach ($this->packageArchive->getExcludedPackages() as $excludedPackage) {
+ if ($excludedPackage['name'] !== 'com.woltlab.wcf') continue;
+
+ $foundCore = true;
+ if (Package::compareVersion(WCF_VERSION, $excludedPackage['version'], '<')) {
+ $hasValidExclude = true;
+ break;
+ }
+ }
+
+ if (!$hasValidExclude) {
+ if (!$foundCore) {
+ return WCF::getLanguage()->get('wcf.acp.devtools.project.path.error.missingExclude');
+ }
+
+ return WCF::getLanguage()->get('wcf.acp.devtools.project.path.error.excludedVersion');
+ }
+ }
+
return '';
}
<item name="wcf.acp.devtools.project.list"><![CDATA[Projekte]]></item>
<item name="wcf.acp.devtools.project.name"><![CDATA[Name]]></item>
<item name="wcf.acp.devtools.project.path"><![CDATA[Pfad]]></item>
+ <item name="wcf.acp.devtools.project.path.error.excludedVersion"><![CDATA[Die aktuelle Core-Version wird in der <kbd>package.xml</kbd> explizit ausgeschlossen.]]></item>
+ <item name="wcf.acp.devtools.project.path.error.missingExclude"><![CDATA[In der <kbd>package.xml</kbd> fehlt die <kbd>>excludedpackage<</kbd>-Anweisung für <kbd>com.woltlab.wcf</kbd>.]]></item>
+ <item name="wcf.acp.devtools.project.path.error.notInstalled"><![CDATA[Das Paket muss bereits installiert sein.]]></item>
+ <item name="wcf.acp.devtools.project.path.error.versionMismatch"><![CDATA[Die Version in der <kbd>package.xml</kbd> passt nicht zur installierten Version, möglicherweise wurde eine falsches Verzeichnis ausgewählt.]]></item>
<item name="wcf.acp.devtools.project.sync"><![CDATA[Daten-Abgleich]]></item>
<item name="wcf.acp.devtools.pip.defaultFilename"><![CDATA[Suchmuster]]></item>
<item name="wcf.acp.devtools.pip.error.notIdempotent"><![CDATA[Das PIP unterstützt keinen wiederholten Import und kann nur bei einem Update verarbeitet werden.]]></item>
<item name="wcf.acp.devtools.project.list"><![CDATA[Projects]]></item>
<item name="wcf.acp.devtools.project.name"><![CDATA[Name]]></item>
<item name="wcf.acp.devtools.project.path"><![CDATA[Path]]></item>
+ <item name="wcf.acp.devtools.project.path.error.excludedVersion"><![CDATA[The current Core-version is explicitly listed as excluded in the <kbd>package.xml</kbd>.]]></item>
+ <item name="wcf.acp.devtools.project.path.error.missingExclude"><![CDATA[The <kbd>package.xml</kbd> is missing the <kbd>>excludedpackage<</kbd>-instruction for <kbd>com.woltlab.wcf</kbd>.]]></item>
+ <item name="wcf.acp.devtools.project.path.error.notInstalled"><![CDATA[The package must be installed already.]]></item>
+ <item name="wcf.acp.devtools.project.path.error.versionMismatch"><![CDATA[The version shown in the <kbd>package.xml</kbd> does not match the installed version, you may have selected the wrong path.]]></item>
<item name="wcf.acp.devtools.project.sync"><![CDATA[Sync Data]]></item>
<item name="wcf.acp.devtools.pip.defaultFilename"><![CDATA[Searchpattern]]></item>
<item name="wcf.acp.devtools.pip.error.notIdempotent"><![CDATA[This PIP does not support repeated imports and can only be processed in regular updates.]]></item>