Commit 329a31ad authored by Thomas Löffler's avatar Thomas Löffler

Merge branch 'develop' into 'master'

Regression Release 07-09-17

See merge request !197
parents 6bfa5675 832635b0
Pipeline #2183 passed with stages
in 2 minutes and 7 seconds
......@@ -487,6 +487,7 @@ class ExtensionController extends \T3o\TerFe2\Controller\AbstractController
// Add +1 to download counter and save immediately
$version->incrementDownloadCounter();
$versionRepository->update($version);
$this->persistenceManager->persistAll();
// Add extension key to session
$downloads[] = $extensionKey;
......
......@@ -83,7 +83,7 @@ class TerIndexer extends \ApacheSolrForTypo3\Solr\IndexQueue\Indexer {
{
$extension = $this->extensionRepository->findByUid($itemRecord['uid']);
if ($extension instanceof \T3o\TerFe2\Domain\Model\Extension) {
if ($extension instanceof \T3o\TerFe2\Domain\Model\Extension && $extension->getLastVersion() instanceof \T3o\TerFe2\Domain\Model\Version) {
$typo3Dependency = $this->getDependencyVersionForPackage($extension, 'typo3');
$document->setField('extensionMinTYPO3Version_tIntS', $typo3Dependency['minimum']);
$document->setField('extensionMaxTYPO3Version_tIntS', $typo3Dependency['maximum']);
......@@ -111,18 +111,14 @@ class TerIndexer extends \ApacheSolrForTypo3\Solr\IndexQueue\Indexer {
}
$document->setField('typo3support_stringM', $typo3Support);
$extensionIcon = $this->getExtensionIcon($itemRecord['ext_key'], $extension->getLastVersion()->getVersionString());
$document->setField('extensionIcon_stringS', $extensionIcon);
// add documentation link
$documentationLink = '';
$extensionIcon = '';
if ($extension->getLastVersion() instanceof \T3o\TerFe2\Domain\Model\Version) {
$extensionIcon = $this->getExtensionIcon($itemRecord['ext_key'], $extension->getLastVersion()->getVersionString());
/** @var \T3o\TerFe2\Service\Documentation $documentationService */
$documentationService = GeneralUtility::makeInstance(\T3o\TerFe2\Service\Documentation::class);
$documentationLink = $documentationService->getDocumentationLink($extension->getExtKey(), $extension->getLastVersion()->getVersionString(), true);
}
/** @var \T3o\TerFe2\Service\Documentation $documentationService */
$documentationService = GeneralUtility::makeInstance(\T3o\TerFe2\Service\Documentation::class);
$documentationLink = $documentationService->getDocumentationLink($extension->getExtKey(), $extension->getLastVersion()->getVersionString(), true);
$document->setField('extensionDocumentationLink_stringS', $documentationLink);
$document->setField('extensionIcon_stringS', $extensionIcon);
}
......
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