diff --git a/extensions/ter/class.tx_ter_helper.php b/extensions/ter/class.tx_ter_helper.php index dae6cfd1a20ed25662d3d92334281efeed520b88..3af86d4c507c58878c3875537617391a598e7863 100755 --- a/extensions/ter/class.tx_ter_helper.php +++ b/extensions/ter/class.tx_ter_helper.php @@ -362,7 +362,7 @@ class tx_ter_helper // Check if update of files requested $updateRequestedFile = $this->pluginObj->repositoryDir . 'extensions.xml.gz.needsupdate'; - if (@filemtime($updateRequestedFile) <= @filemtime($this->pluginObj->repositoryDir . 'extensions.xml.gz')) { + if (file_exists($updateRequestedFile) && @filemtime($updateRequestedFile) <= @filemtime($this->pluginObj->repositoryDir . 'extensions.xml.gz')) { return; } @@ -401,6 +401,7 @@ class tx_ter_helper $dom = new DOMDocument('1.0', 'utf-8'); $dom->formatOutput = true; $extensionsObj = $dom->appendChild(new DOMElement('extensions')); + $documentationService = GeneralUtility::makeInstance(\T3o\TerFe2\Service\DocumentationService::class); // Create the nested XML structure: foreach ($extensionsAndVersionsArr as $extensionKey => $extensionVersionsArr) { @@ -412,6 +413,16 @@ class tx_ter_helper $this->xmlentities($extensionsTotalDownloadsArr[$extensionKey]) ) ); + $extensionRecord = GeneralUtility::makeInstance(\TYPO3\CMS\Core\Database\ConnectionPool::class) + ->getConnectionForTable('tx_terfe2_domain_model_extension') + ->select( + ['uid', 'external_manual'], + 'tx_terfe2_domain_model_extension', + [ + 'ext_key' => $extensionKey + ] + ) + ->fetch(); foreach ($extensionVersionsArr['versions'] as $versionNumber => $extensionVersionArr) { $versionObj = $extensionObj->appendChild(new DOMElement('version')); @@ -463,6 +474,7 @@ class tx_ter_helper ) ); $versionObj->appendChild(new DOMElement('t3xfilemd5', $extensionVersionArr['t3xfilemd5'])); + $versionObj->appendChild(new DOMElement('documentation_link', $extensionRecord['external_manual'] ?: $documentationService->getDocumentationLink($extensionKey, $versionNumber, true))); } }