[BUGFIX] Remove empty brackets when configuration type is unknown
[Packages/TYPO3.CMS.git] / typo3 / cli_dispatch.phpsh
index 7c8da01..d6e10a3 100755 (executable)
  *
  * @author Kasper Skaarhoj <kasperYYYY@typo3.com>
  */
-
-define('TYPO3_MODE','BE');
+define('TYPO3_MODE', 'BE');
 define('TYPO3_cliMode', TRUE);
 
-       // We use require instead of require_once here so we get a fatal error if classes/Bootstrap/Backend.php is accidentally included twice
-       // (which would indicate a clear bug).
-require('classes/Bootstrap/Cli.php');
-Typo3_Bootstrap_Cli::checkEnvironmentOrDie();
-
-require('classes/Bootstrap/Backend.php');
-Typo3_Bootstrap_Backend::checkEnvironmentOrDie();
-Typo3_Bootstrap_Backend::defineBaseConstants();
-Typo3_Bootstrap_Backend::defineAndCheckPaths('typo3/');
-Typo3_Bootstrap_Backend::requireBaseClasses();
-Typo3_Bootstrap_Backend::setUpEnvironment();
-
-       /** @define "PATH_t3lib" "../t3lib/" */
-require(PATH_t3lib . 'config_default.php');
-
-Typo3_Bootstrap_Backend::initializeTypo3DbGlobal(TRUE);
-
-Typo3_Bootstrap_Cli::initializeCliKeyOrDie();
-
-       // Include standard tables.php file
-include(PATH_t3lib . 'stddb/tables.php');
-       // Load temp_CACHED file of ext_tables or each ext_tables.php of loaded extensions
-if ($TYPO3_LOADED_EXT['_CACHEFILE']) {
-       include(PATH_typo3conf . $TYPO3_LOADED_EXT['_CACHEFILE'] . '_ext_tables.php');
-} else {
-       include(PATH_t3lib . 'stddb/load_ext_tables.php');
-}
-       // Load additional ext tables script
-if (TYPO3_extTableDef_script) {
-       include(PATH_typo3conf . TYPO3_extTableDef_script);
-}
-Typo3_Bootstrap_Backend::runExtTablesPostProcessingHooks();
+require __DIR__ . '/sysext/core/Classes/Core/CliBootstrap.php';
+\TYPO3\CMS\Core\Core\CliBootstrap::checkEnvironmentOrDie();
 
-       // TODO: Check if we really need the sprite manager on the command line
-Typo3_Bootstrap_Backend::initializeSpriteManager(TRUE);
+require __DIR__ . '/sysext/core/Classes/Core/Bootstrap.php';
+\TYPO3\CMS\Core\Core\Bootstrap::getInstance()
+       ->baseSetup('typo3/')
+       ->loadConfigurationAndInitialize()
+       ->loadTypo3LoadedExtAndExtLocalconf(TRUE)
+       ->applyAdditionalConfigurationSettings()
+       ->initializeTypo3DbGlobal(TRUE);
 
-Typo3_Bootstrap_Backend::initializeBackendUser();
-Typo3_Bootstrap_Backend::initializeBackendUserMounts();
+\TYPO3\CMS\Core\Core\CliBootstrap::initializeCliKeyOrDie();
 
-Typo3_Bootstrap_Backend::initializeLanguageObject();
+\TYPO3\CMS\Core\Core\Bootstrap::getInstance()
+       ->loadExtensionTables(TRUE)
+       ->initializeBackendUser()
+       ->initializeBackendUserMounts()
+       ->initializeLanguageObject();
 
        // Make sure output is not buffered, so command-line output and interaction can take place
-t3lib_div::flushOutputBuffers();
+\TYPO3\CMS\Core\Utility\GeneralUtility::flushOutputBuffers();
 
 try {
        include(TYPO3_cliInclude);
-} catch (Exception $e) {
+} catch (\Exception $e) {
        fwrite(STDERR, $e->getMessage() . LF);
        exit(99);
 }
 
-Typo3_Bootstrap_Backend::shutdown();
+\TYPO3\CMS\Core\Core\Bootstrap::getInstance()->shutdown();
 ?>
\ No newline at end of file