This repository has been archived by the owner on May 4, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
ext_localconf.php
36 lines (35 loc) · 1.69 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
<?php
defined('TYPO3_MODE') or die();
call_user_func(
function($extKey)
{
// Make the extension version and constraints available
$typo3Version = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Core\Information\Typo3Version::class);
$typo3Branch = $typo3Version->getBranch();
$emConfUtility = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Extensionmanager\Utility\EmConfUtility::class);
if (version_compare($typo3Branch, '10.4', '>=')) {
$emConf =
$emConfUtility->includeEmConf(
$extKey,
[
'packagePath' => \TYPO3\CMS\Core\Utility\GeneralUtility::getFileAbsFileName('EXT:' . $extKey),
]
);
} else {
$emConf =
$emConfUtility->includeEmConf([
'key' => $extKey,
'siteRelPath' => \TYPO3\CMS\Core\Utility\PathUtility::stripPathSitePrefix(\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($extKey)),
]);
}
$GLOBALS['TYPO3_CONF_VARS']['EXTENSIONS'][$extKey]['version'] = $emConf['version'];
$GLOBALS['TYPO3_CONF_VARS']['EXTENSIONS'][$extKey]['constraints'] = $emConf['constraints'];
// Captcha hooks
if (!is_array($GLOBALS['TYPO3_CONF_VARS']['EXTENSIONS'][$extKey]['captcha'])) {
$GLOBALS['TYPO3_CONF_VARS']['EXTENSIONS'][$extKey]['captcha'] = [];
}
$GLOBALS['TYPO3_CONF_VARS']['EXTENSIONS'][$extKey]['captcha'][] = \SJBR\SrFeuserRegister\Captcha\Captcha::class;
$GLOBALS['TYPO3_CONF_VARS']['EXTENSIONS'][$extKey]['captcha'][] = \SJBR\SrFeuserRegister\Captcha\Freecap::class;
},
'sr_email_subscribe'
);