Advertisement
Guest User

Untitled

a guest
Apr 20th, 2018
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.50 KB | None | 0 0
  1. <?php
  2. /**
  3. * Development Configuration
  4. */
  5. $GLOBALS['TYPO3_CONF_VARS']['SYS']['trustedHostsPattern'] = '.*';
  6.  
  7. $GLOBALS['TYPO3_CONF_VARS']['SYS']['sitename'] = 'Lenze Relaunch - Development System';
  8.  
  9. $GLOBALS['TYPO3_CONF_VARS']['FE']['versionNumberInFilename'] = 0;
  10. // Install-Tool PW
  11. $GLOBALS['TYPO3_CONF_VARS']['BE']['installToolPassword'] = '$1$o3bWN86i$WxtRQUA0Np.FtnVQ5qSEY.'; // joh316
  12.  
  13. // Allow clearing Class-Cache in Backend
  14. $GLOBALS['TYPO3_CONF_VARS']['SYS']['clearCacheSystem'] = true;
  15.  
  16. // Global Error-Reporting
  17. error_reporting(E_ALL & ~E_NOTICE & ~E_WARNING & ~E_STRICT & ~E_DEPRECATED);
  18.  
  19. $GLOBALS['TYPO3_CONF_VARS']['SYS']['errorHandlerErrors'] = E_ALL & ~E_NOTICE & ~E_WARNING & ~E_STRICT & ~E_DEPRECATED;
  20. $GLOBALS['TYPO3_CONF_VARS']['SYS']['exceptionalErrors'] = E_ALL & ~E_NOTICE & ~E_WARNING & ~E_STRICT & ~E_DEPRECATED;
  21. $GLOBALS['TYPO3_CONF_VARS']['SYS']['syslogErrorReporting'] = E_ALL & ~E_NOTICE & ~E_WARNING & ~E_STRICT & ~E_DEPRECATED;
  22. $GLOBALS['TYPO3_CONF_VARS']['SYS']['belogErrorReporting'] = E_ALL & ~E_NOTICE & ~E_WARNING & ~E_STRICT & ~E_DEPRECATED;
  23.  
  24. $GLOBALS['TYPO3_CONF_VARS']['SYS']['debug'] = isset($_GET['debug']);
  25. $GLOBALS['TYPO3_CONF_VARS']['SYS']['devIPmask'] = '*';
  26. $GLOBALS['TYPO3_CONF_VARS']['SYS']['displayErrors'] = 1;
  27. $GLOBALS['TYPO3_CONF_VARS']['SYS']['systemLogLevel'] = 0;
  28. $GLOBALS['TYPO3_CONF_VARS']['SYS']['enableDeprecationLog'] = '';
  29.  
  30. if (PHP_SAPI !== 'cli')
  31. {
  32. $GLOBALS['TYPO3_CONF_VARS']['SYS']['sqlDebug'] = 1;
  33. }
  34.  
  35. /**
  36. * Use mailcatcher.me for Test-Mail delivery
  37. *
  38. */
  39. /*
  40. $GLOBALS['TYPO3_CONF_VARS']['MAIL']['transport'] = 'smtp';
  41. $GLOBALS['TYPO3_CONF_VARS']['MAIL']['transport_smtp_server'] = '127.0.0.1:1025';
  42. $GLOBALS['TYPO3_CONF_VARS']['MAIL']['transport_smtp_port'] = '';
  43. $GLOBALS['TYPO3_CONF_VARS']['MAIL']['transport_smtp_encrypt'] ='';
  44. $GLOBALS['TYPO3_CONF_VARS']['MAIL']['transport_smtp_username'] = '';
  45. $GLOBALS['TYPO3_CONF_VARS']['MAIL']['transport_smtp_password'] = '';
  46. */
  47.  
  48. /**
  49. * RealURL Setup
  50. */
  51. $domainAlias = call_user_func(function() {
  52. /*--
  53. // RealUrl Remap to .dev.local
  54. if(isset($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['realurl'])) {
  55. foreach ($domainAlias as $key => $domain) {
  56. // Replace .tld to .dev.local for Development-Mode
  57. $localDomain = $domain . '.relaunch.local';
  58.  
  59. $domainAlias[$key] = $localDomain;
  60. $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['realurl'][$localDomain] = $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['realurl'][$domain];
  61. unset($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['realurl'][$domain]);
  62. }
  63. }
  64. --*/
  65.  
  66. if(!file_exists(__DIR__ . '/DomainConfiguration.local.php'))
  67. {
  68. 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'));
  69. }
  70. $domainAlias = include(__DIR__ . '/DomainConfiguration.local.php');
  71.  
  72. $urlScheme = (\TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('TYPO3_SSL') ? 'https' : 'http');
  73. $baseUrl = $urlScheme . '://' . $domainAlias['www'];
  74.  
  75. // Write TypoScript Constants as default-fallback
  76. $GLOBALS['TYPO3_CONF_VARS']['FE']['defaultTypoScript_constants'] = '
  77. const {
  78. baseURL = ' .$baseUrl. '
  79. urlScheme = ' .$urlScheme. '
  80. domain.cn = ' .$domainAlias['www']. '
  81.  
  82. download.server = download.staging.lenze.com
  83. }
  84. ';
  85.  
  86. ///\TYPO3\CMS\Extbase\Utility\DebuggerUtility::var_dump($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['realurl']);exit;
  87.  
  88. return $domainAlias;
  89. }, $domainAlias);
  90.  
  91.  
  92. /**
  93. * Redirect give Domains to another foreign language
  94. * @Note on Production this is done in .htaccess!
  95. */
  96. call_user_func(function() use($domainAlias) {
  97. if(!preg_match('/^\/[a-z]{2}-[a-z]{2}/', $_SERVER['REQUEST_URI']))
  98. {
  99. if ($_SERVER['SERVER_NAME'] === $domainAlias['schmidhauser'])
  100. {
  101. $defaultLang = 'de-ch';
  102. header(sprintf('location: %s%s', $defaultLang, $_SERVER['REQUEST_URI']), true, 301);
  103. exit;
  104. }
  105.  
  106. if ($_SERVER['SERVER_NAME'] === $domainAlias['selection'])
  107. {
  108. $defaultLang = 'de-at';
  109. header(sprintf('location: %s%s', $defaultLang, $_SERVER['REQUEST_URI']), true, 301);
  110. exit;
  111. }
  112. }
  113. });
  114.  
  115.  
  116. // Extension-Keys only to be enabled in this Context
  117. #git $GLOBALS['TYPO3_CONF_VARS']['EXT']['runtimeActivatedPackages'] = array('imi_realurlcache');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement