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