Commit 7ed9d438 authored by Andreas Fernandez's avatar Andreas Fernandez

Check if files exist and drop fileadmin/ter/ prefix

parent 966eb5d4
Pipeline #3807 passed with stages
in 5 minutes and 33 seconds
......@@ -432,9 +432,16 @@ class tx_ter_helper
$versionObj->appendChild(new DOMElement('reviewstate', intval($extensionVersionArr['reviewstate'])));
$versionObj->appendChild(new DOMElement('category', $this->xmlentities($extensionVersionArr['category'])));
if ($extensionVersionArr['category'] === 'distribution') {
$prefixPathToDistributionFiles = 'fileadmin/ter/' . $extensionKey[0] . '/' . $extensionKey[1] . '/' . $extensionKey . '_' . $versionNumber . '_';
$versionObj->appendChild(new DOMElement('distributionImage', $this->xmlentities($prefixPathToDistributionFiles . 'Distribution.png')));
$versionObj->appendChild(new DOMElement('distributionImageWelcome', $this->xmlentities($prefixPathToDistributionFiles . 'DistributionWelcome.png')));
$prefixPathOnServer = PATH_site . 'fileadmin/ter/';
$prefixDistributionFilePath = $extensionKey[0] . '/' . $extensionKey[1] . '/' . $extensionKey . '_' . $versionNumber . '_';
$distributionImage = $prefixDistributionFilePath . 'Distribution.png';
$distributionWelcomeImage = $prefixDistributionFilePath . 'DistributionWelcome.png';
if (is_file($prefixPathOnServer . $distributionImage)) {
$versionObj->appendChild(new DOMElement('distributionImage', $this->xmlentities($distributionImage)));
}
if (is_file($prefixPathOnServer . $distributionWelcomeImage)) {
$versionObj->appendChild(new DOMElement('distributionImageWelcome', $this->xmlentities($distributionWelcomeImage)));
}
}
$versionObj->appendChild(
new DOMElement(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment