Commit d84c378f authored by Christian Kuhn's avatar Christian Kuhn Committed by Wouter Wolters
Browse files

[TASK] BACK_PATH DocumentTemplate

BACK_PATH in Backend context is always empty string. The patch
removes a couple of simple usages, mostly related to DocumentTemplate.

Resolves: #68790
Releases: master
Change-Id: Ic4897642abf216fbcec430051723bc4b412b321a
Reviewed-on: http://review.typo3.org/42312

Reviewed-by: Anja Leichsenring's avatarAnja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: Anja Leichsenring's avatarAnja Leichsenring <aleichsenring@ab-softlab.de>
Reviewed-by: Wouter Wolters's avatarWouter Wolters <typo3@wouterwolters.nl>
Tested-by: Wouter Wolters's avatarWouter Wolters <typo3@wouterwolters.nl>
parent c346e9bd
......@@ -79,7 +79,6 @@ class BackendLayoutWizardController {
$uid = (int)$this->P['uid'];
// Initialize document object:
$this->doc = GeneralUtility::makeInstance(DocumentTemplate::class);
$this->doc->backPath = $GLOBALS['BACK_PATH'];
$pageRenderer = GeneralUtility::makeInstance(PageRenderer::class);
$pageRenderer->loadExtJS();
$pageRenderer->addJsFile(ExtensionManagementUtility::extRelPath('backend') . 'Resources/Public/JavaScript/grideditor.js');
......
......@@ -57,7 +57,6 @@ class ElementHistoryController {
protected function init() {
// Create internal template object
$this->doc = GeneralUtility::makeInstance(\TYPO3\CMS\Backend\Template\DocumentTemplate::class);
$this->doc->backPath = $GLOBALS['BACK_PATH'];
$this->doc->setModuleTemplate('EXT:backend/Resources/Private/Templates/show_rechis.html');
// Start the page header
$this->content .= $this->doc->header($this->getLanguageService()->getLL('title'));
......
......@@ -106,7 +106,6 @@ class MoveElementController {
$this->perms_clause = $this->getBackendUser()->getPagePermsClause(1);
// Starting the document template object:
$this->doc = GeneralUtility::makeInstance(\TYPO3\CMS\Backend\Template\DocumentTemplate::class);
$this->doc->backPath = $GLOBALS['BACK_PATH'];
$this->doc->setModuleTemplate('EXT:backend/Resources/Private/Templates/move_el.html');
$this->doc->JScode = '';
// Starting document content (header):
......
......@@ -142,7 +142,6 @@ class NewContentElementController {
$this->config = $config['mod.']['wizards.']['newContentElement.'];
// Starting the document template object:
$this->doc = GeneralUtility::makeInstance(\TYPO3\CMS\Backend\Template\DocumentTemplate::class);
$this->doc->backPath = $GLOBALS['BACK_PATH'];
$this->doc->setModuleTemplate('EXT:backend/Resources/Private/Templates/db_new_content_el.html');
$this->doc->JScode = '';
$this->doc->form = '<form action="" name="editForm"><input type="hidden" name="defValues" value="" />';
......
......@@ -681,7 +681,6 @@ class EditDocumentController {
$this->doc = $GLOBALS['TBE_TEMPLATE'];
$pageRenderer = GeneralUtility::makeInstance(PageRenderer::class);
$pageRenderer->addInlineLanguageLabelFile('EXT:lang/locallang_alt_doc.xlf');
$this->doc->backPath = $GLOBALS['BACK_PATH'];
$this->doc->setModuleTemplate('EXT:backend/Resources/Private/Templates/alt_doc.html');
$this->doc->form = '<form action="' . htmlspecialchars($this->R_URI) . '" method="post" enctype="multipart/form-data" name="editform" onsubmit="document.editform._scrollPosition.value=(document.documentElement.scrollTop || document.body.scrollTop); return TBE_EDITOR.checkSubmit(1);">';
// override the default jumpToUrl
......
......@@ -114,7 +114,6 @@ class CreateFolderController {
// Setting template object
$this->doc = GeneralUtility::makeInstance(\TYPO3\CMS\Backend\Template\DocumentTemplate::class);
$this->doc->setModuleTemplate('EXT:backend/Resources/Private/Templates/file_newfolder.html');
$this->doc->backPath = $GLOBALS['BACK_PATH'];
$this->doc->JScode = $this->doc->wrapScriptTags('
var path = "' . $this->target . '";
......
......@@ -111,7 +111,6 @@ class EditFileController {
// Setting template object
$this->doc = GeneralUtility::makeInstance(\TYPO3\CMS\Backend\Template\DocumentTemplate::class);
$this->doc->setModuleTemplate('EXT:backend/Resources/Private/Templates/file_edit.html');
$this->doc->backPath = $GLOBALS['BACK_PATH'];
$this->doc->JScode = $this->doc->wrapScriptTags('
function backToList() { //
top.goToModule("file_list");
......
......@@ -107,7 +107,6 @@ class FileUploadController {
// Setting template object
$this->doc = GeneralUtility::makeInstance(\TYPO3\CMS\Backend\Template\DocumentTemplate::class);
$this->doc->setModuleTemplate('EXT:backend/Resources/Private/Templates/file_upload.html');
$this->doc->backPath = $GLOBALS['BACK_PATH'];
$this->doc->form = '<form action="' . htmlspecialchars(BackendUtility::getModuleUrl('tce_file')) . '" method="post" name="editform" enctype="multipart/form-data">';
}
......
......@@ -112,7 +112,6 @@ class RenameFileController {
// Setting template object
$this->doc = GeneralUtility::makeInstance(\TYPO3\CMS\Backend\Template\DocumentTemplate::class);
$this->doc->setModuleTemplate('EXT:backend/Resources/Private/Templates/file_rename.html');
$this->doc->backPath = $GLOBALS['BACK_PATH'];
$this->doc->JScode = $this->doc->wrapScriptTags('
function backToList() { //
top.goToModule("file_list");
......
......@@ -122,7 +122,6 @@ class ReplaceFileController {
// Setting template object
$this->doc = GeneralUtility::makeInstance(DocumentTemplate::class);
$this->doc->setModuleTemplate('EXT:backend/Resources/Private/Templates/file_replace.html');
$this->doc->backPath = $GLOBALS['BACK_PATH'];
$this->doc->JScode = $this->doc->wrapScriptTags('
function backToList() { //
top.goToModule("file_list");
......
......@@ -131,7 +131,6 @@ class FileSystemNavigationFrameController {
$this->doHighlight = !$this->getBackendUser()->getTSConfigVal('options.pageTree.disableTitleHighlight');
// Create template object:
$this->doc = GeneralUtility::makeInstance(DocumentTemplate::class);
$this->doc->backPath = $GLOBALS['BACK_PATH'];
$this->doc->setModuleTemplate('EXT:backend/Resources/Private/Templates/alt_file_navframe.html');
$this->doc->showFlashMessages = FALSE;
// Adding javascript code for drag&drop and the filetree as well as the click menu code
......
......@@ -182,7 +182,6 @@ class NewRecordController {
$this->pagesOnly = GeneralUtility::_GP('pagesOnly');
// Create instance of template class for output
$this->doc = GeneralUtility::makeInstance(DocumentTemplate::class);
$this->doc->backPath = $GLOBALS['BACK_PATH'];
$this->doc->setModuleTemplate('EXT:backend/Resources/Private/Templates/db_new.html');
$this->doc->JScode = '';
// Setting up the context sensitive menu:
......
......@@ -519,7 +519,6 @@ class PageLayoutController {
// Start document template object:
$this->doc = GeneralUtility::makeInstance(DocumentTemplate::class);
$this->doc->backPath = $GLOBALS['BACK_PATH'];
$this->doc->setModuleTemplate('EXT:backend/Resources/Private/Templates/db_layout.html');
// override the default jumpToUrl
......@@ -669,7 +668,6 @@ class PageLayoutController {
} else {
// If no access or id value, create empty document:
$this->doc = GeneralUtility::makeInstance(DocumentTemplate::class);
$this->doc->backPath = $GLOBALS['BACK_PATH'];
$this->doc->setModuleTemplate('EXT:backend/Resources/Private/Templates/db_layout.html');
$this->doc->JScode = $this->doc->wrapScriptTags('
if (top.fsMod) top.fsMod.recentIds["web"] = ' . (int)$this->id . ';
......
......@@ -137,7 +137,6 @@ class PageTreeNavigationController {
$doHighlight = !$this->getBackendUser()->getTSConfigVal('options.pageTree.disableTitleHighlight');
// Create template object:
$this->doc = GeneralUtility::makeInstance(DocumentTemplate::class);
$this->doc->backPath = $GLOBALS['BACK_PATH'];
$this->doc->setModuleTemplate('EXT:backend/Resources/Private/Templates/alt_db_navframe.html');
$this->doc->showFlashMessages = FALSE;
// Get HTML-Template
......
......@@ -866,7 +866,6 @@ class FormEngine {
// Create an instance of the document template object
// @todo: resolve clash getDocumentTemplate() / getControllerDocumenttemplate()
$GLOBALS['SOBE']->doc = GeneralUtility::makeInstance(DocumentTemplate::class);
$GLOBALS['SOBE']->doc->backPath = $GLOBALS['BACK_PATH'];
// Initialize FormEngine (rendering the forms)
// @todo: check if this is still needed, simplify
$GLOBALS['SOBE']->tceforms = $this;
......
......@@ -56,11 +56,6 @@ class DatabaseIntegrityCheck {
*/
public $rec_idArray = array();
/**
* @var string
*/
public $backPath = '';
/**
* @var array
*/
......
......@@ -160,7 +160,6 @@ class HelpModuleController {
}
$this->doc = GeneralUtility::makeInstance(\TYPO3\CMS\Backend\Template\DocumentTemplate::class);
$this->doc->backPath = $GLOBALS['BACK_PATH'];
$this->doc->setModuleTemplate('EXT:cshmanual/Resources/Private/Templates/cshmanual.html');
$markers = array('CONTENT' => $this->content);
......
......@@ -75,7 +75,6 @@ class ModuleController extends \TYPO3\CMS\Backend\Module\BaseScriptClass {
$this->MOD_SETTINGS = BackendUtility::getModuleData($this->MOD_MENU, \TYPO3\CMS\Core\Utility\GeneralUtility::_GP('SET'), $this->MCONF['name']);
// Draw the header
$this->doc = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Backend\Template\DocumentTemplate::class);
$this->doc->backPath = $GLOBALS['BACK_PATH'];
$this->doc->form = '<form action="" method="post">';
// DBAL page title:
$this->content .= $this->doc->startPage($languageService->getLL('title'));
......
......@@ -272,7 +272,6 @@ class FileListController {
public function main() {
// Initialize the template object
$this->doc = GeneralUtility::makeInstance(DocumentTemplate::class);
$this->doc->backPath = $GLOBALS['BACK_PATH'];
$this->doc->setModuleTemplate('EXT:filelist/Resources/Private/Templates/file_list.html');
$pageRenderer = $this->getPageRenderer();
......
......@@ -44,7 +44,6 @@ abstract class AbstractBackendViewHelper extends AbstractViewHelper {
} else {
/** @var $doc DocumentTemplate */
$doc = GeneralUtility::makeInstance(DocumentTemplate::class);
$doc->backPath = $GLOBALS['BACK_PATH'];
$this->viewHelperVariableContainer->add(AbstractBackendViewHelper::class, 'DocumentTemplate', $doc);
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment