Commit 75c91d48 authored by Benni Mack's avatar Benni Mack Committed by Helmut Hummel
Browse files

[TASK] Deprecate init.php

In order to move all unneeded files from typo3/, the originally lengthy init.php
is now deprecated in favor of using the bootstrap initialization code directly in
the TYPO3 Backend.

Resolves: #67471
Releases: master
Change-Id: Ibb6eb5fc44e985842fa5058cf9cdae50e87d114f
Reviewed-on: http://review.typo3.org/40241


Reviewed-by: Wouter Wolters's avatarWouter Wolters <typo3@wouterwolters.nl>
Tested-by: Wouter Wolters's avatarWouter Wolters <typo3@wouterwolters.nl>
Reviewed-by: default avatarHelmut Hummel <helmut.hummel@typo3.org>
Tested-by: default avatarHelmut Hummel <helmut.hummel@typo3.org>
parent 8f585a63
......@@ -25,9 +25,12 @@
*
* @author Kasper Skårhøj <kasperYYYY@typo3.com>
*/
require __DIR__ . '/init.php';
define('TYPO3_MODE', 'BE');
require __DIR__ . '/sysext/core/Classes/Core/Bootstrap.php';
\TYPO3\CMS\Core\Core\Bootstrap::getInstance()->run('typo3/');
\TYPO3\CMS\Core\Utility\GeneralUtility::deprecationLog('alt_clickmenu.php is deprecated as of TYPO3 CMS 7, and will not work anymore, please use the ajax.php functionality.');
$clickMenuController = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Backend\Controller\ClickMenuController::class);
$clickMenuController->main();
$clickMenuController->printContent();
\ No newline at end of file
$clickMenuController->printContent();
......@@ -17,7 +17,10 @@
*
* @author Kasper Skårhøj <kasperYYYY@typo3.com>
*/
require_once 'init.php';
define('TYPO3_MODE', 'BE');
require __DIR__ . '/sysext/core/Classes/Core/Bootstrap.php';
\TYPO3\CMS\Core\Core\Bootstrap::getInstance()->run('typo3/');
\TYPO3\CMS\Core\Utility\GeneralUtility::deprecationLog('Usage of alt_db_navframe.php is deprecated since TYPO3 CMS 7, and will be removed in TYPO3 CMS 8');
// Make instance if it is not an AJAX call
......
......@@ -19,7 +19,10 @@
*
* @author Kasper Skårhøj <kasperYYYY@typo3.com>
*/
require_once 'init.php';
define('TYPO3_MODE', 'BE');
require __DIR__ . '/sysext/core/Classes/Core/Bootstrap.php';
\TYPO3\CMS\Core\Core\Bootstrap::getInstance()->run('typo3/');
\TYPO3\CMS\Backend\Utility\BackendUtility::lockRecords();
\TYPO3\CMS\Core\Utility\GeneralUtility::deprecationLog(
......
......@@ -17,7 +17,10 @@
*
* @author Kasper Skårhøj <kasperYYYY@typo3.com>
*/
require_once 'init.php';
define('TYPO3_MODE', 'BE');
require __DIR__ . '/sysext/core/Classes/Core/Bootstrap.php';
\TYPO3\CMS\Core\Core\Bootstrap::getInstance()->run('typo3/');
\TYPO3\CMS\Core\Utility\GeneralUtility::deprecationLog('Usage of alt_file_navframe.php is deprecated since TYPO3 CMS 7, and will be removed in TYPO3 CMS 8');
......
......@@ -11,7 +11,10 @@
*
* The TYPO3 project - inspiring people to share!
*/
require_once 'init.php';
define('TYPO3_MODE', 'BE');
require __DIR__ . '/sysext/core/Classes/Core/Bootstrap.php';
\TYPO3\CMS\Core\Core\Bootstrap::getInstance()->run('typo3/');
$GLOBALS['LANG']->includeLLFile('EXT:lang/locallang_misc.xlf');
// Document generation
......
......@@ -17,7 +17,10 @@
*
* @author Kasper Skårhøj <kasperYYYY@typo3.com>
*/
require __DIR__ . '/init.php';
define('TYPO3_MODE', 'BE');
require __DIR__ . '/sysext/core/Classes/Core/Bootstrap.php';
\TYPO3\CMS\Core\Core\Bootstrap::getInstance()->run('typo3/');
\TYPO3\CMS\Core\Utility\GeneralUtility::deprecationLog(
'The entry point to the file/record browser window was moved to an own module. Please use BackendUtility::getModuleUrl(\'browser\') to link to browser.php. This script will be removed in TYPO3 CMS 8.'
......
......@@ -20,7 +20,10 @@
*
* @author Kasper Skårhøj <kasperYYYY@typo3.com>
*/
require __DIR__ . '/init.php';
define('TYPO3_MODE', 'BE');
require __DIR__ . '/sysext/core/Classes/Core/Bootstrap.php';
\TYPO3\CMS\Core\Core\Bootstrap::getInstance()->run('typo3/');
\TYPO3\CMS\Core\Utility\GeneralUtility::deprecationLog(
'The entry point to create a new database entry was moved to an own module. Please use BackendUtility::getModuleUrl(\'db_new\') to link to db_new.php. This script will be removed in TYPO3 CMS 8.'
......
......@@ -17,7 +17,10 @@
*
* @author Kasper Skårhøj <kasperYYYY@typo3.com>
*/
require __DIR__ . '/init.php';
define('TYPO3_MODE', 'BE');
require __DIR__ . '/sysext/core/Classes/Core/Bootstrap.php';
\TYPO3\CMS\Core\Core\Bootstrap::getInstance()->run('typo3/');
\TYPO3\CMS\Core\Utility\GeneralUtility::deprecationLog(
'The entry point to the dummy window was moved to an own module. Please use BackendUtility::getModuleUrl(\'dummy\') to link to dummy.php. This script will be removed in TYPO3 CMS 8.'
......
......@@ -18,7 +18,10 @@
* @author Kasper Skårhøj <kasperYYYY@typo3.com>
*/
define('TYPO3_PROCEED_IF_NO_USER', 1);
require __DIR__ . '/init.php';
define('TYPO3_MODE', 'BE');
require __DIR__ . '/sysext/core/Classes/Core/Bootstrap.php';
\TYPO3\CMS\Core\Core\Bootstrap::getInstance()->run('typo3/');
$loginController = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Backend\Controller\LoginController::class);
$loginController->main();
......@@ -15,7 +15,7 @@
/**
* TYPO3 Backend initialization
*
* This script is called by every backend script.
* This script was called by every backend script to set up the bootstrap.
* The script authenticates the backend user.
* In addition this script also initializes the database and other depending on LocalConfiguration.php
*
......@@ -44,3 +44,4 @@ define('TYPO3_MODE', 'BE');
require __DIR__ . '/sysext/core/Classes/Core/Bootstrap.php';
\TYPO3\CMS\Core\Core\Bootstrap::getInstance()->run('typo3/');
\TYPO3\CMS\Core\Utility\GeneralUtility::deprecationLog('Usage of typo3/init.php is deprecated since TYPO3 CMS 7, and will be removed in TYPO3 CMS 8. Initialize the bootstrap call directly in your entry script.');
......@@ -20,7 +20,10 @@
* @author Kasper Skårhøj <kasperYYYY@typo3.com>
*/
define('TYPO3_PROCEED_IF_NO_USER', 1);
require __DIR__ . '/init.php';
define('TYPO3_MODE', 'BE');
require __DIR__ . '/sysext/core/Classes/Core/Bootstrap.php';
\TYPO3\CMS\Core\Core\Bootstrap::getInstance()->run('typo3/');
\TYPO3\CMS\Core\Utility\GeneralUtility::deprecationLog(
'Login frameset is moved to an own module. Please use BackendUtility::getModuleUrl(\'login_frameset\') to link to login_frameset.php. This script will be removed in TYPO3 CMS 8.'
......
......@@ -18,7 +18,10 @@
*
* @author Kasper Skårhøj <kasperYYYY@typo3.com>
*/
require __DIR__ . '/init.php';
define('TYPO3_MODE', 'BE');
require __DIR__ . '/sysext/core/Classes/Core/Bootstrap.php';
\TYPO3\CMS\Core\Core\Bootstrap::getInstance()->run('typo3/');
\TYPO3\CMS\Core\Utility\GeneralUtility::deprecationLog(
'The entry point to logout was moved to an own module. Please use BackendUtility::getModuleUrl(\'logout\') to link to logout.php. This script will be removed in TYPO3 CMS 8.'
......
......@@ -18,8 +18,10 @@
*
* @author Kasper Skårhøj <kasperYYYY@typo3.com>
*/
require __DIR__ . '/init.php';
define('TYPO3_MODE', 'BE');
require __DIR__ . '/sysext/core/Classes/Core/Bootstrap.php';
\TYPO3\CMS\Core\Core\Bootstrap::getInstance()->run('typo3/');
\TYPO3\CMS\Core\Utility\GeneralUtility::deprecationLog(
'Moving an element is moved to an own module. Please use BackendUtility::getModuleUrl(\'move_element\') to link to move_el.php. This script will be removed in TYPO3 CMS 8.'
);
......
......@@ -12,7 +12,10 @@
* The TYPO3 project - inspiring people to share!
*/
require __DIR__ . '/init.php';
define('TYPO3_MODE', 'BE');
require __DIR__ . '/sysext/core/Classes/Core/Bootstrap.php';
\TYPO3\CMS\Core\Core\Bootstrap::getInstance()->run('typo3/');
\TYPO3\CMS\Core\Utility\GeneralUtility::deprecationLog(
'The entry point to show_item was moved to an own module. Please use BackendUtility::getModuleUrl(\'show_item\') to link to show_item.php. This script will be removed in TYPO3 CMS 8.'
......
......@@ -24,7 +24,7 @@ class AjaxLoginHandler {
/**
* Handles the actual login process, more specifically it defines the response.
* The login details were sent in as part of the ajax request and automatically logged in
* the user inside the init.php part of the ajax call. If that was successful, we have
* the user inside the TYPO3 CMS bootstrap part of the ajax call. If that was successful, we have
* a BE user and reset the timer and hide the login window.
* If it was unsuccessful, we display that and show the login box again.
*
......
......@@ -166,7 +166,7 @@ class FrontendBackendUserAuthentication extends \TYPO3\CMS\Core\Authentication\B
*
****************************************************/
/**
* Implementing the access checks that the typo3/init.php script does before a user is ever logged in.
* Implementing the access checks that the TYPO3 CMS bootstrap script does before a user is ever logged in.
* Used in the frontend.
*
* @return bool Returns TRUE if access is OK
......
......@@ -33,8 +33,6 @@ use TYPO3\CMS\Fluid\View\StandaloneView;
* Finally this file includes the language class for TYPO3's backend.
*
* After this file $LANG and $TBE_TEMPLATE are global variables / instances of their respective classes.
* This file is typically included right after the init.php file,
* if language and layout is needed.
*
* Please refer to Inside TYPO3 for a discussion of how to use this API.
*
......
......@@ -30,7 +30,6 @@ use TYPO3\CMS\Core\Versioning\VersionState;
*
* Notes:
* These functions are strongly related to the interface of TYPO3.
* The class is included in eg. init.php
* Static class, functions called without making a class instance.
*
* @author Kasper Skårhøj <kasperYYYY@typo3.com>
......
......@@ -21,7 +21,11 @@
*/
unset($MCONF);
require __DIR__ . '/conf.php';
require $BACK_PATH . 'init.php';
define('TYPO3_MODE', 'BE');
require $BACK_PATH . 'sysext/core/Classes/Core/Bootstrap.php';
\TYPO3\CMS\Core\Core\Bootstrap::getInstance()->run('typo3/');
$LANG->includeLLFile('EXT:cms/layout/locallang.xlf');
$BE_USER->modAccess($MCONF, 1);
......
......@@ -20,7 +20,8 @@
*/
unset($MCONF);
require __DIR__ . '/conf.php';
require $BACK_PATH . 'init.php';
require $BACK_PATH . 'sysext/core/Classes/Core/Bootstrap.php';
\TYPO3\CMS\Core\Core\Bootstrap::getInstance()->run('typo3/');
// Unset MCONF/MLANG since all we wanted was back path etc. for this particular script.
unset($MCONF);
unset($MLANG);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment