[TASK] Include jQuery with bower and update it to 1.11.3
[Packages/TYPO3.CMS.git] / typo3 / alt_doc.php
index a66d27a..23b520d 100644 (file)
@@ -1,5 +1,5 @@
 <?php
-/**
+/*
  * This file is part of the TYPO3 CMS project.
  *
  * It is free software; you can redistribute it and/or modify it under
  *
  * @author Kasper Skårhøj <kasperYYYY@typo3.com>
  */
-require_once 'init.php';
-\TYPO3\CMS\Backend\Utility\BackendUtility::lockRecords();
+call_user_func(function() {
+       $classLoader = require __DIR__ . '/contrib/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');
+               /* @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();
+               // 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();
-       }
-}
+               // 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();
+               $editDocumentController->init();
+               $editDocumentController->main();
+               $editDocumentController->printContent();
+       });
+});