[TASK] Raise version to 2.3.4-dev
[TYPO3CMS/Extensions/pagenotfoundhandling.git] / ext_localconf.php
1 <?php
2 if (!defined ('TYPO3_MODE')) {
3 die ('Access denied.');
4 }
5
6 // register pageNotFound_handling
7 $GLOBALS['TYPO3_CONF_VARS']['FE']['pageNotFound_handling'] = 'USER_FUNCTION:Aaw\\Pagenotfoundhandling\\Controller\\PagenotfoundController->main';
8
9 // Register an XCLASS for the realurl UrlDecoder
10 // Realurl versions below 1.12.8 are not supported, as of realurl version 2.0.12 $_GET['L'] will be provided anyway
11 if (\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::isLoaded('realurl')) {
12 $packageManager = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Package\\PackageManager');
13 $realurlVersion = $packageManager->getPackage('realurl')->getPackageMetaData()->getVersion();
14 if(version_compare($realurlVersion, '2.0') >= 0 && version_compare($realurlVersion, '2.0.12') < 0) {
15 $GLOBALS['TYPO3_CONF_VARS']['SYS']['Objects']['DmitryDulepov\\Realurl\\Decoder\\UrlDecoder'] = array(
16 'className' => 'Aaw\\Pagenotfoundhandling\\Realurl\\Decoder\\UrlDecoder',
17 );
18 } elseif(version_compare($realurlVersion, '2.0') < 0 && version_compare($realurlVersion, '1.12.8') >= 0) {
19 // version 1.12.8 was the first realurl version with official TYPO3 6.2 support
20 $GLOBALS['TYPO3_CONF_VARS']['SYS']['Objects']['tx_realurl'] = array(
21 'className' => 'Aaw\\Pagenotfoundhandling\\Realurl\\RealurlV1',
22 );
23 }
24 }