Commit a058e277 authored by Georg Ringer's avatar Georg Ringer Committed by Frans Saris
Browse files

[TASK] Remove initialization of $doc->tableLayout in info module

The usage of $doc->tableLayout can be removed as it is not used and
$doc->table() is deprecated as well.

Change-Id: I4a120f165e52ffbfdbffc523a36698f0fab30692
Resolves: #68204
Releases: master
Reviewed-on: http://review.typo3.org/41400


Reviewed-by: Wouter Wolters's avatarWouter Wolters <typo3@wouterwolters.nl>
Tested-by: Wouter Wolters's avatarWouter Wolters <typo3@wouterwolters.nl>
Reviewed-by: Frans Saris's avatarFrans Saris <franssaris@gmail.com>
Tested-by: Frans Saris's avatarFrans Saris <franssaris@gmail.com>
parent c55f0520
......@@ -74,7 +74,9 @@ class InfoModuleController extends BaseScriptClass {
* @return void
*/
public function main() {
// Access check...
$this->doc = GeneralUtility::makeInstance(\TYPO3\CMS\Backend\Template\DocumentTemplate::class);
$this->doc->backPath = $GLOBALS['BACK_PATH'];
// The page will show only if there is a valid page and if this page
// may be viewed by the user
$this->pageinfo = BackendUtility::readPageAccess($this->id, $this->perms_clause);
......@@ -83,21 +85,8 @@ class InfoModuleController extends BaseScriptClass {
if ($this->backendUser->user['admin'] && !$this->id) {
$this->pageinfo = array('title' => '[root-level]', 'uid' => 0, 'pid' => 0);
}
$this->doc = GeneralUtility::makeInstance(\TYPO3\CMS\Backend\Template\DocumentTemplate::class);
$this->doc->backPath = $GLOBALS['BACK_PATH'];
$this->doc->setModuleTemplate('EXT:info/Resources/Private/Templates/info.html');
$this->doc->tableLayout = array(
'0' => array(
'0' => array('<td valign="top"><strong>', '</strong></td>'),
'defCol' => array('<td><img src="' . $this->doc->backPath .
'clear.gif" width="10" height="1" alt="" /></td><td valign="top"><strong>', '</strong></td>')
),
'defRow' => array(
'0' => array('<td valign="top">', '</td>'),
'defCol' => array('<td><img src="' . $this->doc->backPath .
'clear.gif" width="10" height="1" alt="" /></td><td valign="top">', '</td>')
)
);
// JavaScript
$this->doc->postCode = $this->doc->wrapScriptTags('if (top.fsMod) top.fsMod.recentIds["web"] = ' . (int)$this->id . ';');
// Setting up the context sensitive menu:
......@@ -125,11 +114,7 @@ class InfoModuleController extends BaseScriptClass {
$this->content = $this->doc->moduleBody($this->pageinfo, $docHeaderButtons, $markers);
} else {
// If no access or if ID == zero
$this->doc = GeneralUtility::makeInstance(\TYPO3\CMS\Backend\Template\DocumentTemplate::class);
$this->doc->backPath = $GLOBALS['BACK_PATH'];
$this->content = $this->doc->header($this->languageService->getLL('title'));
$this->content .= $this->doc->spacer(5);
$this->content .= $this->doc->spacer(10);
}
// Renders the module page
$this->content = $this->doc->render($this->languageService->getLL('title'), $this->content);
......
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