[!!!][TASK] Move deprecated entrypoints to deprecated.php 29/42329/7
authorBenjamin Mack <benni@typo3.org>
Thu, 6 Aug 2015 18:11:28 +0000 (20:11 +0200)
committerBenni Mack <benni@typo3.org>
Thu, 13 Aug 2015 10:36:29 +0000 (12:36 +0200)
In an effort to clean up the deprecated entrypoints in typo3/
the files are now merged into deprecated.php which still serves
the purpose for calling the proper controller logic.

Resolves: #68812
Releases: master
Change-Id: I85abdbfd188593d50e4aaf362d3a9aa03332f019
Reviewed-on: http://review.typo3.org/42329
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: Wouter Wolters <typo3@wouterwolters.nl>
Reviewed-by: Mathias Brodala <mbrodala@pagemachine.de>
Tested-by: Mathias Brodala <mbrodala@pagemachine.de>
Reviewed-by: Benni Mack <benni@typo3.org>
Tested-by: Benni Mack <benni@typo3.org>
22 files changed:
typo3/.htaccess [new file with mode: 0644]
typo3/ajax.php [deleted file]
typo3/alt_clickmenu.php [deleted file]
typo3/alt_db_navframe.php [deleted file]
typo3/alt_doc.php [deleted file]
typo3/alt_file_navframe.php [deleted file]
typo3/browser.php [deleted file]
typo3/db_new.php [deleted file]
typo3/deprecated.php [new file with mode: 0644]
typo3/dummy.php [deleted file]
typo3/init.php [deleted file]
typo3/install/index.php [deleted file]
typo3/login_frameset.php [deleted file]
typo3/logout.php [deleted file]
typo3/mod.php [deleted file]
typo3/move_el.php [deleted file]
typo3/show_item.php [deleted file]
typo3/sysext/core/Classes/Authentication/BackendUserAuthentication.php
typo3/sysext/core/Documentation/Changelog/master/Breaking-68812-DeprecatedBackendEntrypointsMoved.rst [new file with mode: 0644]
typo3/tce_db.php [deleted file]
typo3/tce_file.php [deleted file]
typo3/thumbs.php [deleted file]

diff --git a/typo3/.htaccess b/typo3/.htaccess
new file mode 100644 (file)
index 0000000..be21169
--- /dev/null
@@ -0,0 +1,15 @@
+<IfModule mod_rewrite.c>
+
+       RewriteEngine On
+
+       # Store the current location in an environment variable CWD to use
+       # mod_rewrite in .htaccess files without knowing the RewriteBase
+       RewriteCond $0#%{REQUEST_URI} ([^#]*)#(.*)\1$
+       RewriteRule ^.*$ - [E=CWD:%2]
+
+       # Redirect install tool files
+       RewriteRule ^install(\/?.*)$ %{ENV:CWD}sysext/install/Start/Install.php [R=307,L]
+
+       # Redirect old entry points
+       RewriteRule ^(ajax|alt_clickmenu|alt_db_navframe|alt_doc|alt_file_navframe|browser|db_new|dummy|init|login_frameset|logout|mod|move_el|show_item|tce_db|tce_file|thumbs)\.php$ %{ENV:CWD}deprecated.php [L]
+</IfModule>
\ No newline at end of file
diff --git a/typo3/ajax.php b/typo3/ajax.php
deleted file mode 100644 (file)
index 1a6c119..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-<?php
-/*
- * This file is part of the TYPO3 CMS project.
- *
- * It is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License, either version 2
- * of the License, or any later version.
- *
- * For the full copyright and license information, please read the
- * LICENSE.txt file that was distributed with this source code.
- *
- * The TYPO3 project - inspiring people to share!
- */
-
-/**
- * AJAX dispatcher
- * main entry point for AJAX calls in the TYPO3 Backend. Based on $TYPO3_AJAX the Bootstrap let's the request
- * handled by TYPO3\CMS\Backend\AjaxRequestHandler and AjaxController.
- * See $TYPO3_CONF_VARS['BE']['AJAX'] and the Core APIs on how to register an AJAX call in the TYPO3 Backend.
- */
-call_user_func(function() {
-       $classLoader = require __DIR__ . '/../vendor/autoload.php';
-       (new \TYPO3\CMS\Backend\Http\Application($classLoader))->run(function() {
-               \TYPO3\CMS\Core\Utility\GeneralUtility::deprecationLog(
-                       '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. This script will be removed in TYPO3 CMS 8.'
-               );
-       });
-});
diff --git a/typo3/alt_clickmenu.php b/typo3/alt_clickmenu.php
deleted file mode 100644 (file)
index 5c36dc3..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-<?php
-/*
- * This file is part of the TYPO3 CMS project.
- *
- * It is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License, either version 2
- * of the License, or any later version.
- *
- * For the full copyright and license information, please read the
- * LICENSE.txt file that was distributed with this source code.
- *
- * The TYPO3 project - inspiring people to share!
- */
-
-/**
- * Context menu
- *
- * The script is called in the top frame of the backend typically by a click on an icon for which a context menu should appear.
- * Either this script displays the context menu horizontally in the top frame or alternatively (default in MSIE, Mozilla) it writes the output to a <div>-layer in the calling document (which then appears as a layer/context sensitive menu)
- * Writing content back into a <div>-layer is necessary if we want individualized context menus with any specific content for any specific element.
- * Context menus can appear for either database elements or files
- * The input to this script is basically the "&init" var which is divided by "|" - each part is a reference to table|uid|listframe-flag.
- *
- * If you want to integrate a context menu in your scripts, please see template::getContextMenuCode()
- */
-call_user_func(function() {
-       $classLoader = require __DIR__ . '/../vendor/autoload.php';
-       (new \TYPO3\CMS\Backend\Http\Application($classLoader))->run(function() {
-               \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();
-       });
-});
diff --git a/typo3/alt_db_navframe.php b/typo3/alt_db_navframe.php
deleted file mode 100644 (file)
index 3960db0..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-<?php
-/*
- * This file is part of the TYPO3 CMS project.
- *
- * It is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License, either version 2
- * of the License, or any later version.
- *
- * For the full copyright and license information, please read the
- * LICENSE.txt file that was distributed with this source code.
- *
- * The TYPO3 project - inspiring people to share!
- */
-
-/**
- * Page navigation tree for the Web module
- */
-call_user_func(function() {
-       $classLoader = require __DIR__ . '/../vendor/autoload.php';
-       (new \TYPO3\CMS\Backend\Http\Application($classLoader))->run(function() {
-               \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
-               if (!(TYPO3_REQUESTTYPE & TYPO3_REQUESTTYPE_AJAX)) {
-                       $pageTreeNavigationController = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Backend\Controller\PageTreeNavigationController::class);
-                       $pageTreeNavigationController->initPage();
-                       $pageTreeNavigationController->main();
-                       $pageTreeNavigationController->printContent();
-               }
-       });
-});
diff --git a/typo3/alt_doc.php b/typo3/alt_doc.php
deleted file mode 100644 (file)
index f7a2758..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-<?php
-/*
- * This file is part of the TYPO3 CMS project.
- *
- * It is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License, either version 2
- * of the License, or any later version.
- *
- * For the full copyright and license information, please read the
- * LICENSE.txt file that was distributed with this source code.
- *
- * The TYPO3 project - inspiring people to share!
- */
-
-/**
- * Main form rendering script
- * By sending certain parameters to this script you can bring up a form
- * which allows the user to edit the content of one or more database records.
- */
-call_user_func(function() {
-       $classLoader = require __DIR__ . '/../vendor/autoload.php';
-       (new \TYPO3\CMS\Backend\Http\Application($classLoader))->run(function() {
-               \TYPO3\CMS\Backend\Utility\BackendUtility::lockRecords();
-
-               \TYPO3\CMS\Core\Utility\GeneralUtility::deprecationLog(
-                       'The entry point to FormEngine was moved to an own module. Please use BackendUtility::getModuleUrl(\'record_edit\') to link to alt_doc.php. This script will be removed in TYPO3 CMS 8.'
-               );
-
-               /* @var $editDocumentController \TYPO3\CMS\Backend\Controller\EditDocumentController */
-               $editDocumentController = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Backend\Controller\EditDocumentController::class);
-
-               // Preprocessing, storing data if submitted to
-               $editDocumentController->preInit();
-
-               // Checks, if a save button has been clicked (or the doSave variable is sent)
-               if ($editDocumentController->doProcessData()) {
-                       $formprotection = \TYPO3\CMS\Core\FormProtection\FormProtectionFactory::get();
-                       if ($formprotection->validateToken(\TYPO3\CMS\Core\Utility\GeneralUtility::_GP('formToken'), 'editRecord')) {
-                               $editDocumentController->processData();
-                       }
-               }
-
-               $editDocumentController->init();
-               $editDocumentController->main();
-               $editDocumentController->printContent();
-       });
-});
diff --git a/typo3/alt_file_navframe.php b/typo3/alt_file_navframe.php
deleted file mode 100644 (file)
index 93bc42d..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-<?php
-/*
- * This file is part of the TYPO3 CMS project.
- *
- * It is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License, either version 2
- * of the License, or any later version.
- *
- * For the full copyright and license information, please read the
- * LICENSE.txt file that was distributed with this source code.
- *
- * The TYPO3 project - inspiring people to share!
- */
-
-/**
- * Folder tree in the File main module.
- */
-
-call_user_func(function() {
-       $classLoader = require __DIR__ . '/../vendor/autoload.php';
-       (new \TYPO3\CMS\Backend\Http\Application($classLoader))->run(function() {
-               \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');
-
-               // Make instance if it is not an AJAX call
-               if (!(TYPO3_REQUESTTYPE & TYPO3_REQUESTTYPE_AJAX)) {
-                       $fileSystemNavigationFrameController = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Backend\Controller\FileSystemNavigationFrameController::class);
-                       $fileSystemNavigationFrameController->initPage();
-                       $fileSystemNavigationFrameController->main();
-                       $fileSystemNavigationFrameController->printContent();
-               }
-       });
-});
diff --git a/typo3/browser.php b/typo3/browser.php
deleted file mode 100644 (file)
index cec437f..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-<?php
-/*
- * This file is part of the TYPO3 CMS project.
- *
- * It is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License, either version 2
- * of the License, or any later version.
- *
- * For the full copyright and license information, please read the
- * LICENSE.txt file that was distributed with this source code.
- *
- * The TYPO3 project - inspiring people to share!
- */
-
-/**
- * This is the frameset to the file/record browser window
- */
-call_user_func(function() {
-       $classLoader = require __DIR__ . '/../vendor/autoload.php';
-       (new \TYPO3\CMS\Backend\Http\Application($classLoader))->run(function() {
-               \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.'
-               );
-
-               $elementBrowserFramesetController = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Recordlist\Controller\ElementBrowserFramesetController::class);
-               $elementBrowserFramesetController->main();
-               $elementBrowserFramesetController->printContent();
-       });
-});
diff --git a/typo3/db_new.php b/typo3/db_new.php
deleted file mode 100644 (file)
index 276fccc..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-<?php
-/*
- * This file is part of the TYPO3 CMS project.
- *
- * It is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License, either version 2
- * of the License, or any later version.
- *
- * For the full copyright and license information, please read the
- * LICENSE.txt file that was distributed with this source code.
- *
- * The TYPO3 project - inspiring people to share!
- */
-
-/**
- * New database item menu
- *
- * This script lets users choose a new database element to create.
- * Includes a wizard mode for visually pointing out the position of new pages
- */
-call_user_func(function() {
-       $classLoader = require __DIR__ . '/../vendor/autoload.php';
-       (new \TYPO3\CMS\Backend\Http\Application($classLoader))->run(function() {
-               \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.'
-               );
-
-               $newRecordController = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Backend\Controller\NewRecordController::class);
-               $newRecordController->main();
-               $newRecordController->printContent();
-       });
-});
diff --git a/typo3/deprecated.php b/typo3/deprecated.php
new file mode 100644 (file)
index 0000000..d24d21d
--- /dev/null
@@ -0,0 +1,226 @@
+<?php
+/*
+ * This file is part of the TYPO3 CMS project.
+ *
+ * It is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License, either version 2
+ * of the License, or any later version.
+ *
+ * For the full copyright and license information, please read the
+ * LICENSE.txt file that was distributed with this source code.
+ *
+ * The TYPO3 project - inspiring people to share!
+ */
+
+/**
+ * Base wrapper for loading old entry points, which are all used within TYPO3 directly
+ * This file is only a deprecation layer, and all @deprecated entrypoints fallbacks will be removed with TYPO3 CMS 8
+ * Use the UriBuilder for generating routes in your scripts to link to Ajax pages, Modules or simple pages in the Backend.
+ */
+
+use TYPO3\CMS\Core\Utility\GeneralUtility;
+use TYPO3\CMS\Backend\Controller;
+
+call_user_func(function() {
+       $classLoader = require __DIR__ . '/../vendor/autoload.php';
+       (new \TYPO3\CMS\Backend\Http\Application($classLoader))->run(function() {
+
+               $originalRequestedFilenameParts = parse_url(GeneralUtility::getIndpEnv('TYPO3_REQUEST_URL'));
+               $originalRequestedFilename = basename($originalRequestedFilenameParts['path']);
+
+               switch ($originalRequestedFilename) {
+                       case 'ajax.php':
+                               GeneralUtility::deprecationLog(
+                                       '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.'
+                               );
+                       break;
+
+                       case 'alt_clickmenu.php':
+                               GeneralUtility::deprecationLog(
+                                       'alt_clickmenu.php is deprecated, and will not work anymore, please use the AJAX functionality as used in the TYPO3 Core.'
+                               );
+
+                               $clickMenuController = GeneralUtility::makeInstance(Controller\ClickMenuController::class);
+                               $clickMenuController->main();
+                               $clickMenuController->printContent();
+                       break;
+
+                       case 'alt_db_navframe.php':
+                               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
+                               $pageTreeNavigationController = GeneralUtility::makeInstance(Controller\PageTreeNavigationController::class);
+                               $pageTreeNavigationController->initPage();
+                               $pageTreeNavigationController->main();
+                               $pageTreeNavigationController->printContent();
+                       break;
+
+                       case 'alt_doc.php':
+                               GeneralUtility::deprecationLog(
+                                       'The entry point to FormEngine was moved to an own module. Please use BackendUtility::getModuleUrl(\'record_edit\') to link to alt_doc.php.'
+                               );
+                               \TYPO3\CMS\Backend\Utility\BackendUtility::lockRecords();
+
+                               /* @var $editDocumentController Controller\EditDocumentController */
+                               $editDocumentController = GeneralUtility::makeInstance(Controller\EditDocumentController::class);
+
+                               // Preprocessing, storing data if submitted to
+                               $editDocumentController->preInit();
+
+                               // Checks, if a save button has been clicked (or the doSave variable is sent)
+                               if ($editDocumentController->doProcessData()) {
+                                       $formProtection = \TYPO3\CMS\Core\FormProtection\FormProtectionFactory::get();
+                                       if ($formProtection->validateToken(GeneralUtility::_GP('formToken'), 'editRecord')) {
+                                               $editDocumentController->processData();
+                                       }
+                               }
+
+                               $editDocumentController->init();
+                               $editDocumentController->main();
+                               $editDocumentController->printContent();
+                       break;
+
+                       case 'alt_file_navframe.php':
+                               GeneralUtility::deprecationLog(
+                                       '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.'
+                               );
+
+                               $fileSystemNavigationFrameController = GeneralUtility::makeInstance(Controller\FileSystemNavigationFrameController::class);
+                               $fileSystemNavigationFrameController->initPage();
+                               $fileSystemNavigationFrameController->main();
+                               $fileSystemNavigationFrameController->printContent();
+                       break;
+
+                       case 'browser.php':
+                               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.'
+                               );
+
+                               $elementBrowserFramesetController = GeneralUtility::makeInstance(\TYPO3\CMS\Recordlist\Controller\ElementBrowserFramesetController::class);
+                               $elementBrowserFramesetController->main();
+                               $elementBrowserFramesetController->printContent();
+                       break;
+
+                       case 'db_new.php':
+                               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.'
+                               );
+
+                               $newRecordController = GeneralUtility::makeInstance(Controller\NewRecordController::class);
+                               $newRecordController->main();
+                               $newRecordController->printContent();
+                       break;
+
+                       case 'dummy.php':
+                               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.'
+                               );
+
+                               $dummyController = GeneralUtility::makeInstance(Controller\DummyController::class);
+                               $dummyController->main();
+                               $dummyController->printContent();
+                       break;
+
+                       case 'init.php':
+                               GeneralUtility::deprecationLog(
+                                       'Usage of typo3/init.php is deprecated. Use index.php with Routing or the Backend Application class directly. See index.php for usage'
+                               );
+                       break;
+
+                       case 'login_frameset.php':
+                               GeneralUtility::deprecationLog(
+                                       'Login frameset is moved to an own module. Please use BackendUtility::getModuleUrl(\'login_frameset\') to link to login_frameset.php.'
+                               );
+
+                               // Make instance:
+                               $loginFramesetController = GeneralUtility::makeInstance(Controller\LoginFramesetController::class);
+                               $loginFramesetController->main();
+                               $loginFramesetController->printContent();
+                       break;
+
+                       case 'logout.php':
+                               GeneralUtility::deprecationLog(
+                                       'The entry point to logout was moved to an own module. Please use BackendUtility::getModuleUrl(\'logout\') to link to logout.php.'
+                               );
+
+                               $logoutController = GeneralUtility::makeInstance(Controller\LogoutController::class);
+                               $logoutController->logout();
+                               // do the redirect
+                               $redirect = GeneralUtility::sanitizeLocalUrl(GeneralUtility::_GP('redirect'));
+                               $redirectUrl = $redirect ?: 'index.php';
+                               \TYPO3\CMS\Core\Utility\HttpUtility::redirect($redirectUrl);
+                       break;
+
+                       case 'mod.php':
+                               GeneralUtility::deprecationLog(
+                                       'The entry point to mod.php was moved to index.php with "M" given. Please use BackendUtility::getModuleUrl(\'myModuleKey\') to link to a module.'
+                               );
+                       break;
+
+                       case 'move_el.php':
+                               GeneralUtility::deprecationLog(
+                                       'Moving an element is moved to an own module. Please use BackendUtility::getModuleUrl(\'move_element\') to link to move_el.php.'
+                               );
+
+                               $moveElementController = GeneralUtility::makeInstance(Controller\ContentElement\MoveElementController::class);
+                               $moveElementController->main();
+                               $moveElementController->printContent();
+                       break;
+
+                       case 'show_item.php':
+                               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.'
+                               );
+
+                               $elementInformationController = GeneralUtility::makeInstance(Controller\ContentElement\ElementInformationController::class);
+                               $elementInformationController->main();
+                               $elementInformationController->printContent();
+                       break;
+
+                       case 'tce_db.php':
+                               GeneralUtility::deprecationLog(
+                                       '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.'
+                               );
+
+                               $simpleDataHandlerController = GeneralUtility::makeInstance(Controller\SimpleDataHandlerController::class);
+
+                               $formProtection = \TYPO3\CMS\Core\FormProtection\FormProtectionFactory::get();
+                               if ($formProtection->validateToken(GeneralUtility::_GP('formToken'), 'tceAction')) {
+                                       $simpleDataHandlerController->initClipboard();
+                                       $simpleDataHandlerController->main();
+                               }
+                               $simpleDataHandlerController->finish();
+                       break;
+
+                       case 'tce_file.php':
+                               GeneralUtility::deprecationLog(
+                                       'File handling entry point was moved an own module. Please use BackendUtility::getModuleUrl(\'tce_file\') to link to tce_file.php.'
+                               );
+
+                               $fileController = GeneralUtility::makeInstance(Controller\File\FileController::class);
+
+                               $formProtection = \TYPO3\CMS\Core\FormProtection\FormProtectionFactory::get();
+                               if ($formProtection->validateToken(GeneralUtility::_GP('formToken'), 'tceAction')) {
+                                       $fileController->main();
+                               }
+
+                               $fileController->finish();
+                       break;
+
+                       case 'thumbs.php':
+                               GeneralUtility::deprecationLog(
+                                       'thumbs.php is no longer in use, please use the corresponding Resource objects to generate a preview functionality for thumbnails.'
+                               );
+                               $GLOBALS['SOBE'] = GeneralUtility::makeInstance(\TYPO3\CMS\Backend\View\ThumbnailView::class);
+                               $GLOBALS['SOBE']->init();
+                               $GLOBALS['SOBE']->main();
+                       break;
+
+                       default:
+                               throw new \RuntimeException('You cannot call this script directly.');
+               }
+
+       });
+});
diff --git a/typo3/dummy.php b/typo3/dummy.php
deleted file mode 100644 (file)
index 3512441..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-<?php
-/*
- * This file is part of the TYPO3 CMS project.
- *
- * It is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License, either version 2
- * of the License, or any later version.
- *
- * For the full copyright and license information, please read the
- * LICENSE.txt file that was distributed with this source code.
- *
- * The TYPO3 project - inspiring people to share!
- */
-
-/**
- * Dummy document - displays nothing but background color.
- */
-call_user_func(function() {
-       $classLoader = require __DIR__ . '/../vendor/autoload.php';
-       (new \TYPO3\CMS\Backend\Http\Application($classLoader))->run(function() {
-               \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.'
-               );
-
-               $dummyController = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Backend\Controller\DummyController::class);
-               $dummyController->main();
-               $dummyController->printContent();
-       });
-});
diff --git a/typo3/init.php b/typo3/init.php
deleted file mode 100644 (file)
index 9e846af..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-<?php
-/*
- * This file is part of the TYPO3 CMS project.
- *
- * It is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License, either version 2
- * of the License, or any later version.
- *
- * For the full copyright and license information, please read the
- * LICENSE.txt file that was distributed with this source code.
- *
- * The TYPO3 project - inspiring people to share!
- */
-
-/**
- * TYPO3 Backend initialization
- *
- * 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
- *
- * IMPORTANT:
- * This script exits if no user is logged in!
- * If you want the script to return even if no user is logged in,
- * you must define the constant TYPO3_PROCEED_IF_NO_USER=1
- * before you include this script.
- *
- *
- * This script does the following:
- * - extracts and defines path's
- * - includes certain libraries
- * - authenticates the user
- * - load the groupdata for the user and set filemounts / webmounts
- *
- * For a detailed description of this script, the scope of constants and variables in it,
- * please refer to the document "Inside TYPO3"
- *
- * Please note that this file might be removed in the future in favor of adding these lines to all entry
- * scripts as well.
- */
-call_user_func(function() {
-       $classLoader = require __DIR__ . '/../vendor/autoload.php';
-       (new \TYPO3\CMS\Backend\Http\Application($classLoader))->run(function() {
-               \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.');
-       });
-});
diff --git a/typo3/install/index.php b/typo3/install/index.php
deleted file mode 100644 (file)
index 56d2226..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-<?php
-// Legacy file. The old install tool entry point was here, it is kept as well known
-// resource for backward compatibility and just redirects to the new entry point.
-header('HTTP/1.1 303 See Other');
-header('Location: ../sysext/install/Start/Install.php');
-die;
diff --git a/typo3/login_frameset.php b/typo3/login_frameset.php
deleted file mode 100644 (file)
index 73b54fb..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-<?php
-/*
- * This file is part of the TYPO3 CMS project.
- *
- * It is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License, either version 2
- * of the License, or any later version.
- *
- * For the full copyright and license information, please read the
- * LICENSE.txt file that was distributed with this source code.
- *
- * The TYPO3 project - inspiring people to share!
- */
-
-/**
- * Login frameset
- *
- * This script generates a login-frameset used when the user must relogin.
- */
-define('TYPO3_PROCEED_IF_NO_USER', 1);
-call_user_func(function() {
-       $classLoader = require __DIR__ . '/../vendor/autoload.php';
-       (new \TYPO3\CMS\Backend\Http\Application($classLoader))->run(function() {
-               \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.'
-               );
-
-               // Make instance:
-               $loginFramesetController = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Backend\Controller\LoginFramesetController::class);
-               $loginFramesetController->main();
-               $loginFramesetController->printContent();
-       });
-});
diff --git a/typo3/logout.php b/typo3/logout.php
deleted file mode 100644 (file)
index 70ae4a7..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-<?php
-/*
- * This file is part of the TYPO3 CMS project.
- *
- * It is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License, either version 2
- * of the License, or any later version.
- *
- * For the full copyright and license information, please read the
- * LICENSE.txt file that was distributed with this source code.
- *
- * The TYPO3 project - inspiring people to share!
- */
-
-/**
- * Logout script for the backend
- * This script saves the interface positions and calls the closeTypo3Windows in the frameset
- */
-call_user_func(function() {
-       $classLoader = require __DIR__ . '/../vendor/autoload.php';
-       (new \TYPO3\CMS\Backend\Http\Application($classLoader))->run(function() {
-               \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.'
-               );
-
-               $logoutController = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Backend\Controller\LogoutController::class);
-               $logoutController->logout();
-               // do the redirect
-               $redirect = \TYPO3\CMS\Core\Utility\GeneralUtility::sanitizeLocalUrl(\TYPO3\CMS\Core\Utility\GeneralUtility::_GP('redirect'));
-               $redirectUrl = $redirect ?: 'index.php';
-               \TYPO3\CMS\Core\Utility\HttpUtility::redirect($redirectUrl);
-       });
-});
diff --git a/typo3/mod.php b/typo3/mod.php
deleted file mode 100644 (file)
index 0604a54..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-<?php
-namespace TYPO3\CMS\Backend;
-
-/*
- * This file is part of the TYPO3 CMS project.
- *
- * It is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License, either version 2
- * of the License, or any later version.
- *
- * For the full copyright and license information, please read the
- * LICENSE.txt file that was distributed with this source code.
- *
- * The TYPO3 project - inspiring people to share!
- */
-
-/**
- * Module entry script
- * Main entry point for all modules (wizards, backend modules, module functions etc)
- * which usually uses the BackendModuleRequestHandler
- */
-call_user_func(function() {
-       $classLoader = require __DIR__ . '/../vendor/autoload.php';
-       (new \TYPO3\CMS\Backend\Http\Application($classLoader))->run(function() {
-               \TYPO3\CMS\Core\Utility\GeneralUtility::deprecationLog(
-                       'The entry point to mod.php was moved to index.php with "M" given. Please use BackendUtility::getModuleUrl(\'myModuleKey\') to link to a module. This script will be removed in TYPO3 CMS 8.'
-               );
-       });
-});
diff --git a/typo3/move_el.php b/typo3/move_el.php
deleted file mode 100644 (file)
index a38fb12..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-<?php
-/*
- * This file is part of the TYPO3 CMS project.
- *
- * It is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License, either version 2
- * of the License, or any later version.
- *
- * For the full copyright and license information, please read the
- * LICENSE.txt file that was distributed with this source code.
- *
- * The TYPO3 project - inspiring people to share!
- */
-
-/**
- * Move element wizard:
- * Moving pages or content elements (tt_content) around in the system via a page tree navigation.
- */
-call_user_func(function() {
-       $classLoader = require __DIR__ . '/../vendor/autoload.php';
-       (new \TYPO3\CMS\Backend\Http\Application($classLoader))->run(function() {
-               \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.'
-               );
-
-               $moveElementController = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Backend\Controller\ContentElement\MoveElementController::class);
-               $moveElementController->main();
-               $moveElementController->printContent();
-       });
-});
diff --git a/typo3/show_item.php b/typo3/show_item.php
deleted file mode 100644 (file)
index 2bb2fe3..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-<?php
-/*
- * This file is part of the TYPO3 CMS project.
- *
- * It is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License, either version 2
- * of the License, or any later version.
- *
- * For the full copyright and license information, please read the
- * LICENSE.txt file that was distributed with this source code.
- *
- * The TYPO3 project - inspiring people to share!
- */
-
-call_user_func(function() {
-       $classLoader = require __DIR__ . '/../vendor/autoload.php';
-       (new \TYPO3\CMS\Backend\Http\Application($classLoader))->run(function() {
-               \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.'
-               );
-
-               $elementInformationController = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(
-                       \TYPO3\CMS\Backend\Controller\ContentElement\ElementInformationController::class
-               );
-               $elementInformationController->main();
-               $elementInformationController->printContent();
-       });
-});
index 5a54112..5450d6a 100644 (file)
@@ -2248,7 +2248,8 @@ This is a dump of the failures:
        public function backendCheckLogin($proceedIfNoUserIsLoggedIn = FALSE) {
                if (empty($this->user['uid'])) {
                        if ($proceedIfNoUserIsLoggedIn === FALSE) {
-                               \TYPO3\CMS\Core\Utility\HttpUtility::redirect($GLOBALS['BACK_PATH']);
+                               $url = GeneralUtility::getIndpEnv('TYPO3_SITE_URL') . TYPO3_mainDir;
+                               \TYPO3\CMS\Core\Utility\HttpUtility::redirect($url);
                        }
                } else {
                        // ...and if that's the case, call these functions
diff --git a/typo3/sysext/core/Documentation/Changelog/master/Breaking-68812-DeprecatedBackendEntrypointsMoved.rst b/typo3/sysext/core/Documentation/Changelog/master/Breaking-68812-DeprecatedBackendEntrypointsMoved.rst
new file mode 100644 (file)
index 0000000..753b187
--- /dev/null
@@ -0,0 +1,58 @@
+=====================================================================
+Breaking: #68812 - Old Backend Entrypoints moved to deprecation layer
+=====================================================================
+
+Description
+===========
+
+The backend entry points within the typo3/ directory, which have been deprecated in favor of using typo3/index.php
+directly as Entry Point via Request Handling, have been moved to a deprecation.php file.
+
+The following files are therefore removed from the typo3/ directory directly:
+
+.. code-block:: shell
+
+       typo3/ajax.php
+       typo3/alt_clickmenu.php
+       typo3/alt_db_navframe.php
+       typo3/alt_doc.php
+       typo3/alt_file_navframe.php
+       typo3/browser.php
+       typo3/db_new.php
+       typo3/dummy.php
+       typo3/init.php
+       typo3/login_frameset.php
+       typo3/logout.php
+       typo3/mod.php
+       typo3/move_el.php
+       typo3/show_item.php
+       typo3/tce_db.php
+       typo3/tce_file.php
+       typo3/thumbs.php
+
+
+The typo3/install/ entrypoint is now also redirected with a rewrite rule.
+
+Impact
+======
+
+All references / links to these entry points directly without using the proper API calls will result
+in a 404 error when using these entry points.
+
+If an Apache webserver is used with the enabled mod_rewrite module, a .htaccess file placed inside typo3/ will
+rewrite the URLs to the deprecated.php and throw a deprecation warning.
+
+For Nginx and IIS an alternative for the rewrite rules in the shipped typo3/.htaccess within needs to be added.
+
+
+Affected Installations
+======================
+
+Installations with third-party extensions that link directly to these files.
+
+
+Migration
+=========
+
+Move all existing code in extensions that link to the deprecated entry points to use methods
+like ``BackendUtility::getModuleUrl()`` and ``BackendUtility::getAjaxUrl()`` or the UriBuilder class.
\ No newline at end of file
diff --git a/typo3/tce_db.php b/typo3/tce_db.php
deleted file mode 100644 (file)
index c9964d7..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-<?php
-/*
- * This file is part of the TYPO3 CMS project.
- *
- * It is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License, either version 2
- * of the License, or any later version.
- *
- * For the full copyright and license information, please read the
- * LICENSE.txt file that was distributed with this source code.
- *
- * The TYPO3 project - inspiring people to share!
- */
-
-/**
- * TCE gateway (TYPO3 Core Engine) for database handling
- * This script is a gateway for POST forms to \TYPO3\CMS\Core\DataHandling\DataHandler
- * that manipulates all information in the database!!
- * For syntax and API information, see the document 'TYPO3 Core APIs'
- */
-call_user_func(function() {
-       $classLoader = require __DIR__ . '/../vendor/autoload.php';
-       (new \TYPO3\CMS\Backend\Http\Application($classLoader))->run(function() {
-               \TYPO3\CMS\Core\Utility\GeneralUtility::deprecationLog(
-                       '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. This script will be removed in TYPO3 CMS 8.'
-               );
-
-               $simpleDataHandlerController = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Backend\Controller\SimpleDataHandlerController::class);
-
-               $formprotection = \TYPO3\CMS\Core\FormProtection\FormProtectionFactory::get();
-               if ($formprotection->validateToken(\TYPO3\CMS\Core\Utility\GeneralUtility::_GP('formToken'), 'tceAction')) {
-                       $simpleDataHandlerController->initClipboard();
-                       $simpleDataHandlerController->main();
-               }
-               $simpleDataHandlerController->finish();
-       });
-});
diff --git a/typo3/tce_file.php b/typo3/tce_file.php
deleted file mode 100644 (file)
index 6565a61..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-<?php
-/*
- * This file is part of the TYPO3 CMS project.
- *
- * It is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License, either version 2
- * of the License, or any later version.
- *
- * For the full copyright and license information, please read the
- * LICENSE.txt file that was distributed with this source code.
- *
- * The TYPO3 project - inspiring people to share!
- */
-
-/**
- * Gateway for TCE (TYPO3 Core Engine) file-handling through POST forms.
- * This script serves as the fileadministration part of the TYPO3 Core Engine.
- * Basically it includes two libraries which are used to manipulate files on the server.
- *
- * For syntax and API information, see the document 'TYPO3 Core APIs'
- */
-call_user_func(function() {
-       $classLoader = require __DIR__ . '/../vendor/autoload.php';
-       (new \TYPO3\CMS\Backend\Http\Application($classLoader))->run(function() {
-               \TYPO3\CMS\Core\Utility\GeneralUtility::deprecationLog(
-                       'File handling entry point was moved an own module. Please use BackendUtility::getModuleUrl(\'tce_file\') to link to tce_file.php. This script will be removed in TYPO3 CMS 8.'
-               );
-
-               $fileController = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Backend\Controller\File\FileController::class);
-
-               $formprotection = \TYPO3\CMS\Core\FormProtection\FormProtectionFactory::get();
-               if ($formprotection->validateToken(\TYPO3\CMS\Core\Utility\GeneralUtility::_GP('formToken'), 'tceAction')) {
-                       $fileController->main();
-               }
-
-               $fileController->finish();
-       });
-});
diff --git a/typo3/thumbs.php b/typo3/thumbs.php
deleted file mode 100644 (file)
index 548629c..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-<?php
-/*
- * This file is part of the TYPO3 CMS project.
- *
- * It is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License, either version 2
- * of the License, or any later version.
- *
- * For the full copyright and license information, please read the
- * LICENSE.txt file that was distributed with this source code.
- *
- * The TYPO3 project - inspiring people to share!
- */
-
-/**
- * Generates a thumbnail and returns an image stream, either GIF/PNG or JPG
- * @deprecated since TYPO3 CMS 7, will be removed with TYPO3 CMS 8, use the corresponding Resource objects and Processing functionality
- */
-call_user_func(function() {
-       $classLoader = require __DIR__ . '/../vendor/autoload.php';
-       (new \TYPO3\CMS\Backend\Http\Application($classLoader))->run(function() {
-               \TYPO3\CMS\Core\Utility\GeneralUtility::deprecationLog(
-                       'thumbs.php is no longer in use, please use the corresponding Resource objects to generate a preview functionality for thumbnails.'
-               );
-               $GLOBALS['SOBE'] = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Backend\View\ThumbnailView::class);
-               $GLOBALS['SOBE']->init();
-               $GLOBALS['SOBE']->main();
-       });
-});