Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- * Development Configuration
- */
- $GLOBALS['TYPO3_CONF_VARS']['SYS']['trustedHostsPattern'] = '.*';
- $GLOBALS['TYPO3_CONF_VARS']['SYS']['sitename'] = 'Lenze Relaunch - Development System';
- $GLOBALS['TYPO3_CONF_VARS']['FE']['versionNumberInFilename'] = 0;
- // Install-Tool PW
- $GLOBALS['TYPO3_CONF_VARS']['BE']['installToolPassword'] = '$1$o3bWN86i$WxtRQUA0Np.FtnVQ5qSEY.'; // joh316
- // Allow clearing Class-Cache in Backend
- $GLOBALS['TYPO3_CONF_VARS']['SYS']['clearCacheSystem'] = true;
- // Global Error-Reporting
- error_reporting(E_ALL & ~E_NOTICE & ~E_WARNING & ~E_STRICT & ~E_DEPRECATED);
- $GLOBALS['TYPO3_CONF_VARS']['SYS']['errorHandlerErrors'] = E_ALL & ~E_NOTICE & ~E_WARNING & ~E_STRICT & ~E_DEPRECATED;
- $GLOBALS['TYPO3_CONF_VARS']['SYS']['exceptionalErrors'] = E_ALL & ~E_NOTICE & ~E_WARNING & ~E_STRICT & ~E_DEPRECATED;
- $GLOBALS['TYPO3_CONF_VARS']['SYS']['syslogErrorReporting'] = E_ALL & ~E_NOTICE & ~E_WARNING & ~E_STRICT & ~E_DEPRECATED;
- $GLOBALS['TYPO3_CONF_VARS']['SYS']['belogErrorReporting'] = E_ALL & ~E_NOTICE & ~E_WARNING & ~E_STRICT & ~E_DEPRECATED;
- $GLOBALS['TYPO3_CONF_VARS']['SYS']['debug'] = isset($_GET['debug']);
- $GLOBALS['TYPO3_CONF_VARS']['SYS']['devIPmask'] = '*';
- $GLOBALS['TYPO3_CONF_VARS']['SYS']['displayErrors'] = 1;
- $GLOBALS['TYPO3_CONF_VARS']['SYS']['systemLogLevel'] = 0;
- $GLOBALS['TYPO3_CONF_VARS']['SYS']['enableDeprecationLog'] = '';
- if (PHP_SAPI !== 'cli')
- {
- $GLOBALS['TYPO3_CONF_VARS']['SYS']['sqlDebug'] = 1;
- }
- /**
- * Use mailcatcher.me for Test-Mail delivery
- *
- */
- /*
- $GLOBALS['TYPO3_CONF_VARS']['MAIL']['transport'] = 'smtp';
- $GLOBALS['TYPO3_CONF_VARS']['MAIL']['transport_smtp_server'] = '127.0.0.1:1025';
- $GLOBALS['TYPO3_CONF_VARS']['MAIL']['transport_smtp_port'] = '';
- $GLOBALS['TYPO3_CONF_VARS']['MAIL']['transport_smtp_encrypt'] ='';
- $GLOBALS['TYPO3_CONF_VARS']['MAIL']['transport_smtp_username'] = '';
- $GLOBALS['TYPO3_CONF_VARS']['MAIL']['transport_smtp_password'] = '';
- */
- /**
- * RealURL Setup
- */
- $domainAlias = call_user_func(function() {
- /*--
- // RealUrl Remap to .dev.local
- if(isset($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['realurl'])) {
- foreach ($domainAlias as $key => $domain) {
- // Replace .tld to .dev.local for Development-Mode
- $localDomain = $domain . '.relaunch.local';
- $domainAlias[$key] = $localDomain;
- $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['realurl'][$localDomain] = $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['realurl'][$domain];
- unset($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['realurl'][$domain]);
- }
- }
- --*/
- if(!file_exists(__DIR__ . '/DomainConfiguration.local.php'))
- {
- die(sprintf('Error: DomainConfiguration Missing!<br /><br />Please setup \'%s\' for local Development-Setup.<br />Use DomainConfiguration.php~dist exists as template.', __DIR__ . '/DomainConfiguration.local.php'));
- }
- $domainAlias = include(__DIR__ . '/DomainConfiguration.local.php');
- $urlScheme = (\TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('TYPO3_SSL') ? 'https' : 'http');
- $baseUrl = $urlScheme . '://' . $domainAlias['www'];
- // Write TypoScript Constants as default-fallback
- $GLOBALS['TYPO3_CONF_VARS']['FE']['defaultTypoScript_constants'] = '
- const {
- baseURL = ' .$baseUrl. '
- urlScheme = ' .$urlScheme. '
- domain.cn = ' .$domainAlias['www']. '
- download.server = download.staging.lenze.com
- }
- ';
- ///\TYPO3\CMS\Extbase\Utility\DebuggerUtility::var_dump($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['realurl']);exit;
- return $domainAlias;
- }, $domainAlias);
- /**
- * Redirect give Domains to another foreign language
- * @Note on Production this is done in .htaccess!
- */
- call_user_func(function() use($domainAlias) {
- if(!preg_match('/^\/[a-z]{2}-[a-z]{2}/', $_SERVER['REQUEST_URI']))
- {
- if ($_SERVER['SERVER_NAME'] === $domainAlias['schmidhauser'])
- {
- $defaultLang = 'de-ch';
- header(sprintf('location: %s%s', $defaultLang, $_SERVER['REQUEST_URI']), true, 301);
- exit;
- }
- if ($_SERVER['SERVER_NAME'] === $domainAlias['selection'])
- {
- $defaultLang = 'de-at';
- header(sprintf('location: %s%s', $defaultLang, $_SERVER['REQUEST_URI']), true, 301);
- exit;
- }
- }
- });
- // Extension-Keys only to be enabled in this Context
- #git $GLOBALS['TYPO3_CONF_VARS']['EXT']['runtimeActivatedPackages'] = array('imi_realurlcache');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement