[BUGFIX] Add case insensitive flag to trustedHostsPattern
[Packages/TYPO3.CMS.git] / typo3 / backend.php
1 <?php
2 /*
3 * This file is part of the TYPO3 CMS project.
4 *
5 * It is free software; you can redistribute it and/or modify it under
6 * the terms of the GNU General Public License, either version 2
7 * of the License, or any later version.
8 *
9 * For the full copyright and license information, please read the
10 * LICENSE.txt file that was distributed with this source code.
11 *
12 * The TYPO3 project - inspiring people to share!
13 */
14 require_once 'init.php';
15 $GLOBALS['LANG']->includeLLFile('EXT:lang/locallang_misc.xlf');
16
17 // Document generation
18 $TYPO3backend = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Backend\Controller\BackendController::class);
19 // Include extensions which may add css, javascript or toolbar items
20 if (is_array($GLOBALS['TYPO3_CONF_VARS']['typo3/backend.php']['additionalBackendItems'])) {
21 foreach ($GLOBALS['TYPO3_CONF_VARS']['typo3/backend.php']['additionalBackendItems'] as $additionalBackendItem) {
22 include_once $additionalBackendItem;
23 }
24 }
25
26 // Process ExtJS module js and css
27 if (is_array($GLOBALS['TBE_MODULES']['_configuration'])) {
28 foreach ($GLOBALS['TBE_MODULES']['_configuration'] as $moduleConfig) {
29 if (is_array($moduleConfig['cssFiles'])) {
30 foreach ($moduleConfig['cssFiles'] as $cssFileName => $cssFile) {
31 $files = array(\TYPO3\CMS\Core\Utility\GeneralUtility::getFileAbsFileName($cssFile));
32 $files = \TYPO3\CMS\Core\Utility\GeneralUtility::removePrefixPathFromList($files, PATH_site);
33 $TYPO3backend->addCssFile($cssFileName, '../' . $files[0]);
34 }
35 }
36 if (is_array($moduleConfig['jsFiles'])) {
37 foreach ($moduleConfig['jsFiles'] as $jsFile) {
38 $files = array(\TYPO3\CMS\Core\Utility\GeneralUtility::getFileAbsFileName($jsFile));
39 $files = \TYPO3\CMS\Core\Utility\GeneralUtility::removePrefixPathFromList($files, PATH_site);
40 $TYPO3backend->addJavascriptFile('../' . $files[0]);
41 }
42 }
43 }
44 }
45 $TYPO3backend->render();
46 \TYPO3\CMS\Core\Core\Bootstrap::getInstance()->shutdown();