-
Notifications
You must be signed in to change notification settings - Fork 21
/
ext_localconf.php
88 lines (73 loc) · 4.43 KB
/
ext_localconf.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
<?php
if (!defined('TYPO3')) {
exit('Access denied.');
}
// Include service configuration
require_once \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath('mksearch').'service/ext_localconf.php';
// Include indexer registrations
require_once \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath('mksearch').'indexer/ext_localconf.php';
// Register hooks
// Hooks for converting Zend_Lucene index data
// $GLOBALS ['TYPO3_CONF_VARS']['EXTCONF']['mksearch']['engine_ZendLucene_indexNew_beforeAddingCoreDataToDocument'][] =
// 'EXT:' . 'mksearch' . '/hooks/class.tx_mksearch_hooks_EngineZendLucene.php:tx_mksearch_hooks_EngineZendLucene->convertFields';
// $GLOBALS ['TYPO3_CONF_VARS']['EXTCONF']['mksearch']['engine_ZendLucene_indexNew_beforeAddingAdditionalDataToDocument'][] =
// 'EXT:' . 'mksearch' . '/hooks/class.tx_mksearch_hooks_EngineZendLucene.php:tx_mksearch_hooks_EngineZendLucene->convertFields';
// rnbase insert and update hooks (requires rn_base 0.14.6)
if (isset($GLOBALS['TYPO3_CONF_VARS']['EXTENSIONS']['mksearch']['enableRnBaseUtilDbHook'])
&& (int) $GLOBALS['TYPO3_CONF_VARS']['EXTENSIONS']['mksearch']['enableRnBaseUtilDbHook'] > 0
) {
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['rn_base']['util_db_do_insert_post'][] =
'tx_mksearch_hooks_IndexerAutoUpdate->rnBaseDoInsertPost';
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['rn_base']['util_db_do_update_post'][] =
'tx_mksearch_hooks_IndexerAutoUpdate->rnBaseDoUpdatePost';
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['rn_base']['util_db_do_delete_pre'][] =
'tx_mksearch_hooks_IndexerAutoUpdate->rnBaseDoDeletePre';
}
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['rn_base']['util_db_do_select_pre'][] =
'tx_mksearch_hooks_DatabaseConnection->doSelectPre';
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['rn_base']['util_db_do_select_post'][] =
'tx_mksearch_hooks_DatabaseConnection->doSelectPost';
// Hook for manipulating a single search term used with Zend_Lucene
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['mksearch']['engine_ZendLucene_buildQuery_manipulateSingleTerm'][] =
'tx_mksearch_hooks_EngineZendLucene->manipulateSingleTerm';
// Hooks for auto-updating search indices
// TODO: Die Hooks per EM-Config zuschaltbar machen
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['processDatamapClass'][] =
'tx_mksearch_hooks_IndexerAutoUpdate';
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['processCmdmapClass'][] =
'tx_mksearch_hooks_IndexerAutoUpdate';
// Include PageTSConfig for backend module
// @todo Can be removed when support for TYPO3 11.5 is dropped.
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPageTSConfig('<INCLUDE_TYPOSCRIPT: source="FILE:EXT:mksearch/Configuration/page.tsconfig">');
// Register information for the test and sleep tasks
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['scheduler']['tasks']['tx_mksearch_scheduler_IndexTask'] = [
'extension' => 'mksearch',
'title' => 'LLL:EXT:mksearch/Resources/Private/Language/locallang_db.xlf:scheduler_indexTask_name',
'description' => 'LLL:EXT:mksearch/Resources/Private/Language/locallang_db.xlf:scheduler_indexTask_description',
'additionalFields' => 'tx_mksearch_scheduler_IndexTaskAddFieldProvider',
];
if (\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::isLoaded('mksanitizedparameters')) {
require_once \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath('mksearch', 'ext_mksanitizedparameter_rules.php');
}
require_once \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath('mksearch', 'Configuration/XClasses.php');
\Sys25\RnBase\Utility\CHashUtility::addExcludedParametersForCacheHash([
'mksearch[pb-search-pointer]',
'mksearch[submit]',
'mksearch[term]',
'mksearch[sort]',
'mksearch[sortorder]',
'mksearch[fq]',
'mksearch[combination]',
'mksearch[NK_addfq]',
'mksearch[NK_remfq]',
]);
// eigenes Feld für Vorbelegung je nach Indexer
$GLOBALS['TYPO3_CONF_VARS']['SYS']['formEngine']['nodeRegistry']['mksearch_indexerConfigurationField'] = [
'nodeName' => 'indexerConfigurationField',
'priority' => '70',
'class' => 'DMK\\Mksearch\\Backend\\Form\\Element\\IndexerConfigurationField',
];
// no_search needs to be in the rootline fields so respectNoSearchFlagInRootline
// in indexers works correct
$GLOBALS['TYPO3_CONF_VARS']['FE']['addRootLineFields'] .= ',no_search';
require_once \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath('mksearch', 'Classes/Constants.php');