TYPO3  7.6
deprecated.php
Go to the documentation of this file.
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 
22 use TYPO3\CMS\Backend\Controller;
23 
24 call_user_func(function () {
25  $classLoader = require __DIR__ . '/../vendor/autoload.php';
26  (new \TYPO3\CMS\Backend\Http\Application($classLoader))->run(function () {
27 
28  $originalRequestedFilenameParts = parse_url(GeneralUtility::getIndpEnv('TYPO3_REQUEST_URL'));
29  $originalRequestedFilename = basename($originalRequestedFilenameParts['path']);
30 
31  switch ($originalRequestedFilename) {
32  case 'ajax.php':
33  GeneralUtility::deprecationLog(
34  'The entry point to ajax.php was moved to index.php with ajaxID given. Please use BackendUtility::getAjaxUrl(\'myAjaxKey\') to link to the AJAX Call.'
35  );
36  break;
37 
38  case 'alt_clickmenu.php':
39  GeneralUtility::deprecationLog(
40  'alt_clickmenu.php is deprecated, and will not work anymore, please use the AJAX functionality as used in the TYPO3 Core.'
41  );
42 
43  $clickMenuController = GeneralUtility::makeInstance(Controller\ClickMenuController::class);
44  $clickMenuController->main();
45  $clickMenuController->printContent();
46  break;
47 
48  case 'alt_db_navframe.php':
49  GeneralUtility::deprecationLog(
50  'Usage of alt_db_navframe.php is deprecated since TYPO3 CMS 7, and will be removed in TYPO3 CMS 8'
51  );
52 
53  // Make instance if it is not an AJAX call
54  $pageTreeNavigationController = GeneralUtility::makeInstance(Controller\PageTreeNavigationController::class);
55  $pageTreeNavigationController->initPage();
56  $pageTreeNavigationController->main();
57  $pageTreeNavigationController->printContent();
58  break;
59 
60  case 'alt_doc.php':
61  GeneralUtility::deprecationLog(
62  'The entry point to FormEngine was moved to an own module. Please use BackendUtility::getModuleUrl(\'record_edit\') to link to alt_doc.php.'
63  );
64  \TYPO3\CMS\Backend\Utility\BackendUtility::lockRecords();
65 
66  /* @var $editDocumentController Controller\EditDocumentController */
67  $editDocumentController = GeneralUtility::makeInstance(Controller\EditDocumentController::class);
68 
69  // Preprocessing, storing data if submitted to
70  $editDocumentController->preInit();
71 
72  // Checks, if a save button has been clicked (or the doSave variable is sent)
73  if ($editDocumentController->doProcessData()) {
74  $formProtection = \TYPO3\CMS\Core\FormProtection\FormProtectionFactory::get();
75  if ($formProtection->validateToken(GeneralUtility::_GP('formToken'), 'editRecord')) {
76  $editDocumentController->processData();
77  }
78  }
79 
80  $editDocumentController->init();
81  $editDocumentController->main();
82  $editDocumentController->printContent();
83  break;
84 
85  case 'alt_file_navframe.php':
86  GeneralUtility::deprecationLog(
87  'The entry point to the folder tree was moved to an own module. Please use BackendUtility::getModuleUrl(\'file_navframe\') to link to alt_file_navframe.php.'
88  );
89 
90  $fileSystemNavigationFrameController = GeneralUtility::makeInstance(Controller\FileSystemNavigationFrameController::class);
91  $fileSystemNavigationFrameController->initPage();
92  $fileSystemNavigationFrameController->main();
93  $fileSystemNavigationFrameController->printContent();
94  break;
95 
96  case 'browser.php':
97  GeneralUtility::deprecationLog(
98  '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.'
99  );
100 
101  $elementBrowserFramesetController = GeneralUtility::makeInstance(\TYPO3\CMS\Recordlist\Controller\ElementBrowserFramesetController::class);
102  $elementBrowserFramesetController->main();
103  $elementBrowserFramesetController->printContent();
104  break;
105 
106  case 'db_new.php':
107  GeneralUtility::deprecationLog(
108  '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.'
109  );
110 
111  $newRecordController = GeneralUtility::makeInstance(Controller\NewRecordController::class);
112  $newRecordController->main();
113  $newRecordController->printContent();
114  break;
115 
116  case 'dummy.php':
117  GeneralUtility::deprecationLog(
118  'The entry point to the dummy window was moved to an own module. Please use BackendUtility::getModuleUrl(\'dummy\') to link to dummy.php.'
119  );
120 
121  $dummyController = GeneralUtility::makeInstance(Controller\DummyController::class);
122  $dummyController->main();
123  $dummyController->printContent();
124  break;
125 
126  case 'init.php':
127  GeneralUtility::deprecationLog(
128  'Usage of typo3/init.php is deprecated. Use index.php with Routing or the Backend Application class directly. See index.php for usage'
129  );
130  break;
131 
132  case 'login_frameset.php':
133  GeneralUtility::deprecationLog(
134  'Login frameset is moved to an own module. Please use BackendUtility::getModuleUrl(\'login_frameset\') to link to login_frameset.php.'
135  );
136 
137  // Make instance:
138  $loginFramesetController = GeneralUtility::makeInstance(Controller\LoginFramesetController::class);
139  $loginFramesetController->main();
140  $loginFramesetController->printContent();
141  break;
142 
143  case 'logout.php':
144  GeneralUtility::deprecationLog(
145  'The entry point to logout was moved to an own module. Please use BackendUtility::getModuleUrl(\'logout\') to link to logout.php.'
146  );
147 
148  $logoutController = GeneralUtility::makeInstance(Controller\LogoutController::class);
149  $logoutController->logout();
150  // do the redirect
151  $redirect = GeneralUtility::sanitizeLocalUrl(GeneralUtility::_GP('redirect'));
152  $redirectUrl = $redirect ?: 'index.php';
153  \TYPO3\CMS\Core\Utility\HttpUtility::redirect($redirectUrl);
154  break;
155 
156  case 'mod.php':
157  GeneralUtility::deprecationLog(
158  'The entry point to mod.php was moved to index.php with "M" given. Please use BackendUtility::getModuleUrl(\'myModuleKey\') to link to a module.'
159  );
160  break;
161 
162  case 'move_el.php':
163  GeneralUtility::deprecationLog(
164  'Moving an element is moved to an own module. Please use BackendUtility::getModuleUrl(\'move_element\') to link to move_el.php.'
165  );
166 
167  $moveElementController = GeneralUtility::makeInstance(Controller\ContentElement\MoveElementController::class);
168  $moveElementController->main();
169  $moveElementController->printContent();
170  break;
171 
172  case 'show_item.php':
173  GeneralUtility::deprecationLog(
174  'The entry point to show_item was moved to an own module. Please use BackendUtility::getModuleUrl(\'show_item\') to link to show_item.php.'
175  );
176 
177  $elementInformationController = GeneralUtility::makeInstance(Controller\ContentElement\ElementInformationController::class);
178  $elementInformationController->main();
179  $elementInformationController->printContent();
180  break;
181 
182  case 'tce_db.php':
183  GeneralUtility::deprecationLog(
184  'The entry point to data handling via DataHandler was moved to an own module. Please use BackendUtility::getModuleUrl(\'tce_db\') to link to tce_db.php / DataHandler.'
185  );
186 
187  $simpleDataHandlerController = GeneralUtility::makeInstance(Controller\SimpleDataHandlerController::class);
188 
189  $formProtection = \TYPO3\CMS\Core\FormProtection\FormProtectionFactory::get();
190  if ($formProtection->validateToken(GeneralUtility::_GP('formToken'), 'tceAction')) {
191  $simpleDataHandlerController->initClipboard();
192  $simpleDataHandlerController->main();
193  }
194  $simpleDataHandlerController->finish();
195  break;
196 
197  case 'tce_file.php':
198  GeneralUtility::deprecationLog(
199  'File handling entry point was moved an own module. Please use BackendUtility::getModuleUrl(\'tce_file\') to link to tce_file.php.'
200  );
201 
202  $fileController = GeneralUtility::makeInstance(Controller\File\FileController::class);
203 
204  $formProtection = \TYPO3\CMS\Core\FormProtection\FormProtectionFactory::get();
205  if ($formProtection->validateToken(GeneralUtility::_GP('formToken'), 'tceAction')) {
206  $fileController->main();
207  }
208 
209  $fileController->finish();
210  break;
211 
212  case 'thumbs.php':
213  GeneralUtility::deprecationLog(
214  'thumbs.php is no longer in use, please use the corresponding Resource objects to generate a preview functionality for thumbnails.'
215  );
216  $GLOBALS['SOBE'] = GeneralUtility::makeInstance(\TYPO3\CMS\Backend\View\ThumbnailView::class);
217  $GLOBALS['SOBE']->init();
218  $GLOBALS['SOBE']->main();
219  break;
220 
221  default:
222  throw new \RuntimeException('You cannot call this script directly.');
223  }
224 
225  });
226 });