[TASK] Deprecate init.php
[Packages/TYPO3.CMS.git] / typo3 / sysext / cms / layout / db_layout.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
15 /**
16 * Module: Web>Page
17 *
18 * This module lets you view a page in a more Content Management like style than the ordinary record-list
19 *
20 * @author Kasper Skårhøj <kasperYYYY@typo3.com>
21 */
22 unset($MCONF);
23 require __DIR__ . '/conf.php';
24
25 define('TYPO3_MODE', 'BE');
26
27 require $BACK_PATH . 'sysext/core/Classes/Core/Bootstrap.php';
28 \TYPO3\CMS\Core\Core\Bootstrap::getInstance()->run('typo3/');
29 $LANG->includeLLFile('EXT:cms/layout/locallang.xlf');
30
31 $BE_USER->modAccess($MCONF, 1);
32 // Will open up records locked by current user. It's assumed that the locking should end if this script is hit.
33 \TYPO3\CMS\Backend\Utility\BackendUtility::lockRecords();
34
35 \TYPO3\CMS\Core\Utility\GeneralUtility::deprecationLog(
36 'The page layout class is moved to an own module. Please use BackendUtility::getModuleUrl(\'web_layout\') to link to db_layout.php. This script will be removed with version TYPO3 CMS 8.'
37 );
38
39 $GLOBALS['SOBE'] = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Backend\Controller\PageLayoutController::class);
40 $GLOBALS['SOBE']->init();
41 $GLOBALS['SOBE']->clearCache();
42 $GLOBALS['SOBE']->main();
43 $GLOBALS['SOBE']->printContent();