diff --git a/typo3/sysext/backend/Classes/Backend/ToolbarItems/ClearCacheToolbarItem.php b/typo3/sysext/backend/Classes/Backend/ToolbarItems/ClearCacheToolbarItem.php index debd6e65c306f4e6f9ae0dcf880e2115cbda87e2..2d6dcb5d281ce30974b303bc267e780c003697d5 100644 --- a/typo3/sysext/backend/Classes/Backend/ToolbarItems/ClearCacheToolbarItem.php +++ b/typo3/sysext/backend/Classes/Backend/ToolbarItems/ClearCacheToolbarItem.php @@ -54,7 +54,7 @@ class ClearCacheToolbarItem implements ToolbarItemInterface { 'id' => 'pages', 'title' => $languageService->sL('LLL:EXT:lang/locallang_core.xlf:flushPageCachesTitle', TRUE), 'description' => $languageService->sL('LLL:EXT:lang/locallang_core.xlf:flushPageCachesDescription', TRUE), - 'href' => 'tce_db.php?vC=' . $backendUser->veriCode() . '&cacheCmd=pages&ajaxCall=1' . BackendUtility::getUrlToken('tceAction'), + 'href' => BackendUtility::getModuleUrl('tce_db') . '&vC=' . $backendUser->veriCode() . '&cacheCmd=pages&ajaxCall=1' . BackendUtility::getUrlToken('tceAction'), 'icon' => IconUtility::getSpriteIcon('actions-system-cache-clear-impact-low') ); $this->optionValues[] = 'pages'; @@ -66,7 +66,7 @@ class ClearCacheToolbarItem implements ToolbarItemInterface { 'id' => 'all', 'title' => $languageService->sL('LLL:EXT:lang/locallang_core.xlf:flushGeneralCachesTitle', TRUE), 'description' => $languageService->sL('LLL:EXT:lang/locallang_core.xlf:flushGeneralCachesDescription', TRUE), - 'href' => 'tce_db.php?vC=' . $backendUser->veriCode() . '&cacheCmd=all&ajaxCall=1' . BackendUtility::getUrlToken('tceAction'), + 'href' => BackendUtility::getModuleUrl('tce_db') . '&vC=' . $backendUser->veriCode() . '&cacheCmd=all&ajaxCall=1' . BackendUtility::getUrlToken('tceAction'), 'icon' => IconUtility::getSpriteIcon('actions-system-cache-clear-impact-medium') ); $this->optionValues[] = 'all'; @@ -82,7 +82,7 @@ class ClearCacheToolbarItem implements ToolbarItemInterface { 'id' => 'system', 'title' => $languageService->sL('LLL:EXT:lang/locallang_core.xlf:flushSystemCachesTitle', TRUE), 'description' => $languageService->sL('LLL:EXT:lang/locallang_core.xlf:flushSystemCachesDescription', TRUE), - 'href' => 'tce_db.php?vC=' . $backendUser->veriCode() . '&cacheCmd=system&ajaxCall=1' . BackendUtility::getUrlToken('tceAction'), + 'href' => BackendUtility::getModuleUrl('tce_db') . '&vC=' . $backendUser->veriCode() . '&cacheCmd=system&ajaxCall=1' . BackendUtility::getUrlToken('tceAction'), 'icon' => IconUtility::getSpriteIcon('actions-system-cache-clear-impact-high') ); $this->optionValues[] = 'system'; diff --git a/typo3/sysext/backend/Classes/ClickMenu/ClickMenu.php b/typo3/sysext/backend/Classes/ClickMenu/ClickMenu.php index c4874fb5235ddc150292740003bae45cb6c92901..969edae221254eea42593605526cf2460f67a2cd 100644 --- a/typo3/sysext/backend/Classes/ClickMenu/ClickMenu.php +++ b/typo3/sysext/backend/Classes/ClickMenu/ClickMenu.php @@ -727,7 +727,7 @@ class ClickMenu { } else { $conf = '1==1'; } - $editOnClick = 'if(' . $loc . ' && ' . $conf . ' ){' . $loc . '.location.href=top.TS.PATH_typo3+\'tce_db.php?redirect=\'+top.rawurlencode(' . $this->frameLocation(($loc . '.document')) . '.pathname+' . $this->frameLocation(($loc . '.document')) . '.search)+\'' . '&cmd[' . $table . '][' . $uid . '][delete]=1&prErr=1&vC=' . $this->backendUser->veriCode() . BackendUtility::getUrlToken('tceAction') . '\';};'; + $editOnClick = 'if(' . $loc . ' && ' . $conf . ' ){' . $loc . '.location.href=top.TS.PATH_typo3+\'' . BackendUtility::getModuleUrl('tce_db') . '&redirect=\'+top.rawurlencode(' . $this->frameLocation(($loc . '.document')) . '.pathname+' . $this->frameLocation(($loc . '.document')) . '.search)+\'' . '&cmd[' . $table . '][' . $uid . '][delete]=1&prErr=1&vC=' . $this->backendUser->veriCode() . BackendUtility::getUrlToken('tceAction') . '\';};'; if ($table === 'pages') { $editOnClick .= 'top.nav.refresh.defer(500, top.nav);'; } @@ -798,7 +798,7 @@ class ClickMenu { public function DB_changeFlag($table, $rec, $flagField, $title) { $uid = $rec['_ORIG_uid'] ?: $rec['uid']; $loc = 'top.content.list_frame'; - $editOnClick = 'if(' . $loc . '){' . $loc . '.location.href=top.TS.PATH_typo3+\'tce_db.php?redirect=\'' . '+top.rawurlencode(' . $this->frameLocation(($loc . '.document')) . '.pathname+' . $this->frameLocation(($loc . '.document')) . '.search)+\'' . '&data[' . $table . '][' . $uid . '][' . $flagField . ']=' . ($rec[$flagField] ? 0 : 1) . '&prErr=1&vC=' . $this->backendUser->veriCode() . BackendUtility::getUrlToken('tceAction') . '\';};'; + $editOnClick = 'if(' . $loc . '){' . $loc . '.location.href=top.TS.PATH_typo3+\'' . BackendUtility::getModuleUrl('tce_db') . '&redirect=\'' . '+top.rawurlencode(' . $this->frameLocation(($loc . '.document')) . '.pathname+' . $this->frameLocation(($loc . '.document')) . '.search)+\'' . '&data[' . $table . '][' . $uid . '][' . $flagField . ']=' . ($rec[$flagField] ? 0 : 1) . '&prErr=1&vC=' . $this->backendUser->veriCode() . BackendUtility::getUrlToken('tceAction') . '\';};'; if ($table === 'pages') { $editOnClick .= 'top.nav.refresh.defer(500, top.nav);'; } @@ -1117,7 +1117,7 @@ class ClickMenu { public function dragDrop_copymovepage($srcUid, $dstUid, $action, $into) { $negativeSign = $into === 'into' ? '' : '-'; $loc = 'top.content.list_frame'; - $editOnClick = 'if(' . $loc . '){' . $loc . '.document.location=top.TS.PATH_typo3+"tce_db.php?redirect="+top.rawurlencode(' . $this->frameLocation(($loc . '.document')) . '.pathname+' . $this->frameLocation(($loc . '.document')) . '.search)+"' . '&cmd[pages][' . $srcUid . '][' . $action . ']=' . $negativeSign . $dstUid . '&prErr=1&vC=' . $this->backendUser->veriCode() . BackendUtility::getUrlToken('tceAction') . '";};top.nav.refresh();'; + $editOnClick = 'if(' . $loc . '){' . $loc . '.document.location=top.TS.PATH_typo3+"' . BackendUtility::getModuleUrl('tce_db') . '&redirect="+top.rawurlencode(' . $this->frameLocation(($loc . '.document')) . '.pathname+' . $this->frameLocation(($loc . '.document')) . '.search)+"' . '&cmd[pages][' . $srcUid . '][' . $action . ']=' . $negativeSign . $dstUid . '&prErr=1&vC=' . $this->backendUser->veriCode() . BackendUtility::getUrlToken('tceAction') . '";};top.nav.refresh();'; return $this->linkItem($this->label($action . 'Page_' . $into), IconUtility::getSpriteIcon('actions-document-paste-' . $into), $editOnClick . 'return false;', 0); } diff --git a/typo3/sysext/backend/Classes/Clipboard/Clipboard.php b/typo3/sysext/backend/Classes/Clipboard/Clipboard.php index 291c16c0272a86e4a8e822ef64bb83b427315713..06b6fbcf84f72125f605eba962799516aeb4872c 100644 --- a/typo3/sysext/backend/Classes/Clipboard/Clipboard.php +++ b/typo3/sysext/backend/Classes/Clipboard/Clipboard.php @@ -565,7 +565,7 @@ class Clipboard { * @return string */ public function pasteUrl($table, $uid, $setRedirect = TRUE, array $update = NULL) { - $rU = $this->backPath . ($table == '_FILE' ? 'tce_file.php' : 'tce_db.php') . '?' . + $rU = $this->backPath . ($table == '_FILE' ? 'tce_file.php' . '?' : BackendUtility::getModuleUrl('tce_db') . '&') . ($setRedirect ? 'redirect=' . rawurlencode(GeneralUtility::linkThisScript(array('CB' => ''))) : '') . '&vC=' . $GLOBALS['BE_USER']->veriCode() . '&prErr=1&uPT=1' . @@ -584,7 +584,7 @@ class Clipboard { * @return string */ public function deleteUrl($setRedirect = 1, $file = 0) { - $rU = $this->backPath . ($file ? 'tce_file.php' : 'tce_db.php') . '?' . ($setRedirect ? 'redirect=' . rawurlencode(GeneralUtility::linkThisScript(array('CB' => ''))) : '') . '&vC=' . $GLOBALS['BE_USER']->veriCode() . '&prErr=1&uPT=1' . '&CB[delete]=1' . '&CB[pad]=' . $this->current . BackendUtility::getUrlToken('tceAction'); + $rU = $this->backPath . ($file ? 'tce_file.php' . '?' : BackendUtility::getModuleUrl('tce_db') . '&') . ($setRedirect ? 'redirect=' . rawurlencode(GeneralUtility::linkThisScript(array('CB' => ''))) : '') . '&vC=' . $GLOBALS['BE_USER']->veriCode() . '&prErr=1&uPT=1' . '&CB[delete]=1' . '&CB[pad]=' . $this->current . BackendUtility::getUrlToken('tceAction'); return $rU; } diff --git a/typo3/sysext/backend/Classes/Controller/EditDocumentController.php b/typo3/sysext/backend/Classes/Controller/EditDocumentController.php index 7f4b95860798eb323200f03dcd555d4e44c0f12b..e0a1501f3c2d4d2ff7cb86d8fd07ea53db556763 100644 --- a/typo3/sysext/backend/Classes/Controller/EditDocumentController.php +++ b/typo3/sysext/backend/Classes/Controller/EditDocumentController.php @@ -686,7 +686,7 @@ class EditDocumentController { if ( ' . ($GLOBALS['BE_USER']->jsConfirmation(4) ? 'confirm(' . GeneralUtility::quoteJSvalue($GLOBALS['LANG']->getLL('deleteWarning')) . ')' : '1==1') . ' ) { - window.location.href = "tce_db.php?cmd["+table+"]["+id+"][delete]=1' . BackendUtility::getUrlToken('tceAction') . '&redirect="+escape(url)+"&vC=' . $GLOBALS['BE_USER']->veriCode() . '&prErr=1&uPT=1"; + window.location.href = "' . BackendUtility::getModuleUrl('tce_db') . '&cmd["+table+"]["+id+"][delete]=1' . BackendUtility::getUrlToken('tceAction') . '&redirect="+escape(url)+"&vC=' . $GLOBALS['BE_USER']->veriCode() . '&prErr=1&uPT=1"; } return false; } diff --git a/typo3/sysext/backend/Classes/Controller/PageLayoutController.php b/typo3/sysext/backend/Classes/Controller/PageLayoutController.php index 1e169939f469c000895bcc83d135f0ae76be7509..992130208a2f8e1d3f58c2721195c7a6f0558983 100644 --- a/typo3/sysext/backend/Classes/Controller/PageLayoutController.php +++ b/typo3/sysext/backend/Classes/Controller/PageLayoutController.php @@ -478,7 +478,7 @@ class PageLayoutController { function deleteRecord(table,id,url) { // if (confirm(' . GeneralUtility::quoteJSvalue($GLOBALS['LANG']->getLL('deleteWarning')) . ')) { - window.location.href = "' . $GLOBALS['BACK_PATH'] . 'tce_db.php?cmd["+table+"]["+id+"][delete]=1&redirect="+escape(url)+"&vC=' . $GLOBALS['BE_USER']->veriCode() . BackendUtility::getUrlToken('tceAction') . '&prErr=1&uPT=1"; + window.location.href = "' . $GLOBALS['BACK_PATH'] . BackendUtility::getModuleUrl('tce_db') . '&cmd["+table+"]["+id+"][delete]=1&redirect="+escape(url)+"&vC=' . $GLOBALS['BE_USER']->veriCode() . BackendUtility::getUrlToken('tceAction') . '&prErr=1&uPT=1"; } return false; } @@ -651,7 +651,7 @@ class PageLayoutController { // Alternative template $this->doc->setModuleTemplate('EXT:backend/Resources/Private/Templates/db_layout_quickedit.html'); // Alternative form tag; Quick Edit submits its content to tce_db.php. - $this->doc->form = '<form action="' . htmlspecialchars($GLOBALS['BACK_PATH'] . 'tce_db.php?&prErr=1&uPT=1') . '" method="post" enctype="' . $GLOBALS['TYPO3_CONF_VARS']['SYS']['form_enctype'] . '" name="editform" onsubmit="return TBE_EDITOR.checkSubmit(1);">'; + $this->doc->form = '<form action="' . htmlspecialchars($GLOBALS['BACK_PATH'] . BackendUtility::getModuleUrl('tce_db') . '&prErr=1&uPT=1') . '" method="post" enctype="' . $GLOBALS['TYPO3_CONF_VARS']['SYS']['form_enctype'] . '" name="editform" onsubmit="return TBE_EDITOR.checkSubmit(1);">'; // Setting up the context sensitive menu: $this->doc->getContextMenuCode(); // Set the edit_record value for internal use in this function: diff --git a/typo3/sysext/backend/Classes/Controller/Wizard/RteController.php b/typo3/sysext/backend/Classes/Controller/Wizard/RteController.php index 43142fe5e3b1e0b95323e6c1186d522ea9b131d4..584ea9ea12d1f2afeab6e9d57c11f4e20165fb2d 100644 --- a/typo3/sysext/backend/Classes/Controller/Wizard/RteController.php +++ b/typo3/sysext/backend/Classes/Controller/Wizard/RteController.php @@ -89,7 +89,7 @@ class RteController extends AbstractWizardController { // Need to NOT have the page wrapped in DIV since if we do that we destroy // the feature that the RTE spans the whole height of the page!!! $this->doc->divClass = ''; - $this->doc->form = '<form action="tce_db.php" method="post" enctype="' . $GLOBALS['TYPO3_CONF_VARS']['SYS']['form_enctype'] . '" name="editform" onsubmit="return TBE_EDITOR.checkSubmit(1);">'; + $this->doc->form = '<form action="' . BackendUtility::getModuleUrl('tce_db') . '" method="post" enctype="' . $GLOBALS['TYPO3_CONF_VARS']['SYS']['form_enctype'] . '" name="editform" onsubmit="return TBE_EDITOR.checkSubmit(1);">'; } /** diff --git a/typo3/sysext/backend/Classes/Template/DocumentTemplate.php b/typo3/sysext/backend/Classes/Template/DocumentTemplate.php index b15903005bcb78aaef6c0560fd2986342500b7e2..02a44fb5ddc2e4d94906d6e494073cafb2fcd186 100644 --- a/typo3/sysext/backend/Classes/Template/DocumentTemplate.php +++ b/typo3/sysext/backend/Classes/Template/DocumentTemplate.php @@ -548,7 +548,7 @@ function jumpToUrl(URL) { */ public function issueCommand($params, $redirectUrl = '') { $redirectUrl = $redirectUrl ? $redirectUrl : GeneralUtility::getIndpEnv('REQUEST_URI'); - $commandUrl = $this->backPath . 'tce_db.php?' . $params . '&redirect=' . ($redirectUrl == -1 ? '\'+T3_THIS_LOCATION+\'' : rawurlencode($redirectUrl)) . '&vC=' . rawurlencode($GLOBALS['BE_USER']->veriCode()) . BackendUtility::getUrlToken('tceAction') . '&prErr=1&uPT=1'; + $commandUrl = $this->backPath . BackendUtility::getModuleUrl('tce_db') . '&' . $params . '&redirect=' . ($redirectUrl == -1 ? '\'+T3_THIS_LOCATION+\'' : rawurlencode($redirectUrl)) . '&vC=' . rawurlencode($GLOBALS['BE_USER']->veriCode()) . BackendUtility::getUrlToken('tceAction') . '&prErr=1&uPT=1'; return $commandUrl; } diff --git a/typo3/sysext/backend/Classes/Tree/View/PageMovingPagePositionMap.php b/typo3/sysext/backend/Classes/Tree/View/PageMovingPagePositionMap.php index 59b34f5a5c38b11b7d9a64fdc3a0dc93bb9691ca..ef02aac6fe02540783ef8d784c1bb96b3540b187 100644 --- a/typo3/sysext/backend/Classes/Tree/View/PageMovingPagePositionMap.php +++ b/typo3/sysext/backend/Classes/Tree/View/PageMovingPagePositionMap.php @@ -42,7 +42,7 @@ class PageMovingPagePositionMap extends PagePositionMap { * @return string Onclick attribute content */ public function onClickEvent($pid, $newPagePID) { - return 'window.location.href=\'tce_db.php?cmd[pages][' . $GLOBALS['SOBE']->moveUid . '][' . $this->moveOrCopy . ']=' . $pid . '&redirect=' . rawurlencode($this->R_URI) . '&prErr=1&uPT=1&vC=' . $GLOBALS['BE_USER']->veriCode() . \TYPO3\CMS\Backend\Utility\BackendUtility::getUrlToken('tceAction') . '\';return false;'; + return 'window.location.href=\'' . \TYPO3\CMS\Backend\Utility\BackendUtility::getModuleUrl('tce_db') . '&cmd[pages][' . $GLOBALS['SOBE']->moveUid . '][' . $this->moveOrCopy . ']=' . $pid . '&redirect=' . rawurlencode($this->R_URI) . '&prErr=1&uPT=1&vC=' . $GLOBALS['BE_USER']->veriCode() . \TYPO3\CMS\Backend\Utility\BackendUtility::getUrlToken('tceAction') . '\';return false;'; } /** diff --git a/typo3/sysext/backend/Classes/Tree/View/PagePositionMap.php b/typo3/sysext/backend/Classes/Tree/View/PagePositionMap.php index fe1bf62c7ade3823b12dbc688d1869b1822438f2..f96f6c34d53f501f48baed7707ff77a6dbed0a88 100644 --- a/typo3/sysext/backend/Classes/Tree/View/PagePositionMap.php +++ b/typo3/sysext/backend/Classes/Tree/View/PagePositionMap.php @@ -511,9 +511,9 @@ class PagePositionMap { public function onClickInsertRecord($row, $vv, $moveUid, $pid, $sys_lang = 0) { $table = 'tt_content'; if (is_array($row)) { - $location = 'tce_db.php?cmd[' . $table . '][' . $moveUid . '][' . $this->moveOrCopy . ']=-' . $row['uid'] . '&prErr=1&uPT=1&vC=' . $GLOBALS['BE_USER']->veriCode() . BackendUtility::getUrlToken('tceAction'); + $location = BackendUtility::getModuleUrl('tce_db') . '&cmd[' . $table . '][' . $moveUid . '][' . $this->moveOrCopy . ']=-' . $row['uid'] . '&prErr=1&uPT=1&vC=' . $GLOBALS['BE_USER']->veriCode() . BackendUtility::getUrlToken('tceAction'); } else { - $location = 'tce_db.php?cmd[' . $table . '][' . $moveUid . '][' . $this->moveOrCopy . ']=' . $pid . '&data[' . $table . '][' . $moveUid . '][colPos]=' . $vv . '&prErr=1&vC=' . $GLOBALS['BE_USER']->veriCode() . BackendUtility::getUrlToken('tceAction'); + $location = BackendUtility::getModuleUrl('tce_db') . '&cmd[' . $table . '][' . $moveUid . '][' . $this->moveOrCopy . ']=' . $pid . '&data[' . $table . '][' . $moveUid . '][colPos]=' . $vv . '&prErr=1&vC=' . $GLOBALS['BE_USER']->veriCode() . BackendUtility::getUrlToken('tceAction'); } $location .= '&redirect=' . rawurlencode($this->R_URI); // returns to prev. page diff --git a/typo3/sysext/backend/Modules/File/Database/conf.php b/typo3/sysext/backend/Modules/File/Database/conf.php new file mode 100644 index 0000000000000000000000000000000000000000..274737c3a305b4a23d6b91adf22c371a5dbfd8ba --- /dev/null +++ b/typo3/sysext/backend/Modules/File/Database/conf.php @@ -0,0 +1,4 @@ +<?php +// Required for mod.php +$MCONF['name'] = 'tce_db'; +$MCONF['script'] = '_DISPATCH'; \ No newline at end of file diff --git a/typo3/sysext/backend/Modules/File/Database/index.php b/typo3/sysext/backend/Modules/File/Database/index.php new file mode 100644 index 0000000000000000000000000000000000000000..8adf1dfb4d3fc80d9284d699c8f0855d1bfafcc7 --- /dev/null +++ b/typo3/sysext/backend/Modules/File/Database/index.php @@ -0,0 +1,31 @@ +<?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' + * + * @author Kasper Skårhøj <kasperYYYY@typo3.com> + */ + +$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/sysext/backend/ext_tables.php b/typo3/sysext/backend/ext_tables.php index 1b78a19286147268317ecf6d3200eba68f2bee34..f6cee4c95e1aa53a3243f86a394de17beb778f40 100644 --- a/typo3/sysext/backend/ext_tables.php +++ b/typo3/sysext/backend/ext_tables.php @@ -38,6 +38,12 @@ if (TYPO3_MODE === 'BE') { \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($_EXTKEY) . 'Modules/File/Upload/' ); + // Register tce_db + \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addModulePath( + 'tce_db', + \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($_EXTKEY) . 'Modules/File/Database/' + ); + // Register edit wizard \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addModulePath( 'wizard_edit', diff --git a/typo3/sysext/beuser/Classes/ViewHelpers/IssueCommandViewHelper.php b/typo3/sysext/beuser/Classes/ViewHelpers/IssueCommandViewHelper.php index 1f7c2ab2852eda543c25842efc4c9cbea593b6e2..8ab64cc37e8828a7df7cb5a8bdb2d76cf7366577 100644 --- a/typo3/sysext/beuser/Classes/ViewHelpers/IssueCommandViewHelper.php +++ b/typo3/sysext/beuser/Classes/ViewHelpers/IssueCommandViewHelper.php @@ -34,7 +34,7 @@ class IssueCommandViewHelper extends \TYPO3\CMS\Fluid\Core\ViewHelper\AbstractVi */ public function render($parameters, $redirectUrl = '') { $redirectUrl = $redirectUrl ?: \TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('REQUEST_URI'); - return htmlspecialchars($GLOBALS['BACK_PATH'] . 'tce_db.php?' . $parameters . '&redirect=' . ($redirectUrl === '' ? '\' + T3_THIS_LOCATION + \'' : rawurlencode($redirectUrl)) . '&vC=' . rawurlencode($GLOBALS['BE_USER']->veriCode()) . \TYPO3\CMS\Backend\Utility\BackendUtility::getUrlToken('tceAction') . '&prErr=1&uPT=1'); + return htmlspecialchars($GLOBALS['BACK_PATH'] . BackendUtility::getModuleUrl('tce_db') . '&' . $parameters . '&redirect=' . ($redirectUrl === '' ? '\' + T3_THIS_LOCATION + \'' : rawurlencode($redirectUrl)) . '&vC=' . rawurlencode($GLOBALS['BE_USER']->veriCode()) . \TYPO3\CMS\Backend\Utility\BackendUtility::getUrlToken('tceAction') . '&prErr=1&uPT=1'); } } diff --git a/typo3/sysext/beuser/Classes/ViewHelpers/RemoveUserViewHelper.php b/typo3/sysext/beuser/Classes/ViewHelpers/RemoveUserViewHelper.php index d846e238b3f82336cdfbf34b5704b1cd3843e10a..ba12f1f752bdc9d135881336aa9e66dee1d6ce3a 100644 --- a/typo3/sysext/beuser/Classes/ViewHelpers/RemoveUserViewHelper.php +++ b/typo3/sysext/beuser/Classes/ViewHelpers/RemoveUserViewHelper.php @@ -39,7 +39,7 @@ class RemoveUserViewHelper extends \TYPO3\CMS\Fluid\Core\ViewHelper\AbstractView $redirectUrl = GeneralUtility::getIndpEnv('REQUEST_URI'); $parameters = 'cmd[be_users][' . $backendUser->getUid() . '][delete]=1'; - $url = $GLOBALS['BACK_PATH'] . 'tce_db.php?&' . $parameters . '&redirect=' . + $url = $GLOBALS['BACK_PATH'] . BackendUtility::getModuleUrl('tce_db') . '&' . $parameters . '&redirect=' . ($redirectUrl == '' ? '\' + T3_THIS_LOCATION + \'' : rawurlencode($redirectUrl)) . '&vC=' . rawurlencode($GLOBALS['BE_USER']->veriCode()) . BackendUtility::getUrlToken('tceAction') . '&prErr=1&uPT=1'; return '<a class="btn" href="' . $url . '" onclick="return confirm(' . diff --git a/typo3/sysext/core/Classes/Database/QueryView.php b/typo3/sysext/core/Classes/Database/QueryView.php index 5d5cf36bf461f1d87ea22dc7a0080d1c89d04ddb..de72f9d9b57878f16d76d9ee01f4a3ffd34b25d1 100644 --- a/typo3/sysext/core/Classes/Database/QueryView.php +++ b/typo3/sysext/core/Classes/Database/QueryView.php @@ -545,12 +545,12 @@ class QueryView { $out .= '<a class="btn" href="#" onClick="top.launchView(\'' . $table . '\',' . $row['uid'] . ',\'' . $GLOBALS['BACK_PATH'] . '\');return false;">' . \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('status-dialog-information') . '</a>'; $out .= '<a class="btn" href="#" onClick="' . BackendUtility::editOnClick($params, $GLOBALS['BACK_PATH'], (GeneralUtility::getIndpEnv('REQUEST_URI') . GeneralUtility::implodeArrayForUrl('SET', (array)GeneralUtility::_POST('SET')))) . '">' . \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('actions-document-open') . '</a>'; } else { - $out .= '<a class="btn" href="' . GeneralUtility::linkThisUrl(($GLOBALS['BACK_PATH'] . 'tce_db.php'), array( + $out .= '<a class="btn" href="' . GeneralUtility::linkThisUrl(($GLOBALS['BACK_PATH'] . BackendUtility::getModuleUrl('tce_db')), array( ('cmd[' . $table . '][' . $row['uid'] . '][undelete]') => '1', 'redirect' => GeneralUtility::linkThisScript(array()) )) . BackendUtility::getUrlToken('tceAction') . '">'; $out .= \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('actions-edit-restore', array('title' => 'undelete only')) . '</a>'; - $out .= '<a class="btn" href="' . GeneralUtility::linkThisUrl(($GLOBALS['BACK_PATH'] . 'tce_db.php'), array( + $out .= '<a class="btn" href="' . GeneralUtility::linkThisUrl(($GLOBALS['BACK_PATH'] . BackendUtility::getModuleUrl('tce_db')), array( ('cmd[' . $table . '][' . $row['uid'] . '][undelete]') => '1', 'redirect' => GeneralUtility::linkThisUrl('alt_doc.php', array( ('edit[' . $table . '][' . $row['uid'] . ']') => 'edit', diff --git a/typo3/sysext/sys_note/Classes/ViewHelpers/DeleteLinkViewHelper.php b/typo3/sysext/sys_note/Classes/ViewHelpers/DeleteLinkViewHelper.php index 68b8ee216d4dedf6fa127ff5befbcc9a59521697..3e722ac183ae982a2fac24be5b6f4b02adcefb8d 100644 --- a/typo3/sysext/sys_note/Classes/ViewHelpers/DeleteLinkViewHelper.php +++ b/typo3/sysext/sys_note/Classes/ViewHelpers/DeleteLinkViewHelper.php @@ -30,7 +30,7 @@ class DeleteLinkViewHelper extends \TYPO3\CMS\Fluid\Core\ViewHelper\AbstractView public function render($id) { $redirectUrl = \TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('REQUEST_URI'); $parameters = 'cmd[sys_note][' . $id . '][delete]=1'; - $url = $GLOBALS['BACK_PATH'] . 'tce_db.php?&' . $parameters . '&redirect=' . ($redirectUrl == '' ? '\' + T3_THIS_LOCATION + \'' : rawurlencode($redirectUrl)) . \TYPO3\CMS\Backend\Utility\BackendUtility::getUrlToken('tceAction'); + $url = $GLOBALS['BACK_PATH'] . BackendUtility::getModuleUrl('tce_db') . '&' . $parameters . '&redirect=' . ($redirectUrl == '' ? '\' + T3_THIS_LOCATION + \'' : rawurlencode($redirectUrl)) . \TYPO3\CMS\Backend\Utility\BackendUtility::getUrlToken('tceAction'); return $url; } diff --git a/typo3/sysext/version/Classes/Controller/VersionModuleController.php b/typo3/sysext/version/Classes/Controller/VersionModuleController.php index 9a92a60123ccef453b1ecaaf2d8c2e628df6a9d5..95b84745e5b7ec2894d58471520955ae4731675a 100644 --- a/typo3/sysext/version/Classes/Controller/VersionModuleController.php +++ b/typo3/sysext/version/Classes/Controller/VersionModuleController.php @@ -385,7 +385,7 @@ class VersionModuleController extends \TYPO3\CMS\Backend\Module\BaseScriptClass // Create new: $content = ' - <form action="' . $this->doc->backPath . 'tce_db.php" method="post"> + <form action="' . $this->doc->backPath . BackendUtility::getModuleUrl('tce_db') . '" method="post"> ' . $GLOBALS['LANG']->getLL('tblHeader_t3ver_label') . ': <input type="text" name="cmd[' . $this->table . '][' . $this->uid . '][version][label]" /><br /> <br /><input type="hidden" name="cmd[' . $this->table . '][' . $this->uid . '][version][action]" value="new" /> <input type="hidden" name="prErr" value="1" /> diff --git a/typo3/tce_db.php b/typo3/tce_db.php index 64151cf893723bd6b895a4a97c8dbb6a437270eb..67121d3371e231014dcd469aa45f0c6dccefacf9 100644 --- a/typo3/tce_db.php +++ b/typo3/tce_db.php @@ -22,6 +22,10 @@ */ require __DIR__ . '/init.php'; +\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();