Skip to content

Commit

Permalink
[TASK] Use correct namespace for SolrFalAspect when running Solrfal 2.1+
Browse files Browse the repository at this point in the history
  • Loading branch information
lorenzulrich authored and frans-beech-it committed Apr 20, 2016
1 parent c72aa9b commit 435efaa
Showing 1 changed file with 16 additions and 7 deletions.
23 changes: 16 additions & 7 deletions ext_localconf.php
Expand Up @@ -109,11 +109,20 @@
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['ke_search']['modifyFileIndexEntryFromContentIndexer'][] = 'BeechIt\\FalSecuredownload\\Hooks\\KeSearchFilesHook';
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['ke_search']['modifyFileIndexEntry'][] = 'BeechIt\\FalSecuredownload\\Hooks\\KeSearchFilesHook';

// ext:solrfal enrich metadata and generate correct public url slot
$signalSlotDispatcher->connect(
'TYPO3\\Solr\\Solrfal\\Indexing\\DocumentFactory',
'fileMetaDataRetrieved',
'BeechIt\\FalSecuredownload\\Aspects\\SolrFalAspect',
'fileMetaDataRetrieved'
);
if (\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::isLoaded('solrfal')) {
$solrfalVersion = \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getExtensionVersion('solrfal');
if (\TYPO3\CMS\Core\Utility\VersionNumberUtility::convertVersionNumberToInteger($solrfalVersion) >= 2001000) {
// Namespace change in Solrfal 2.1
$solrfalDocumentFactoryClassName = 'ApacheSolrForTypo3\\Solrfal\\Indexing\\DocumentFactory';
} else {
$solrfalDocumentFactoryClassName = 'TYPO3\\Solr\\Solrfal\\Indexing\\DocumentFactory';
}
// ext:solrfal enrich metadata and generate correct public url slot
$signalSlotDispatcher->connect(
$solrfalDocumentFactoryClassName,
'fileMetaDataRetrieved',
'BeechIt\\FalSecuredownload\\Aspects\\SolrFalAspect',
'fileMetaDataRetrieved'
);
}
}

0 comments on commit 435efaa

Please sign in to comment.