From f8a63d8947713580bf5c238c62b506f300a973a8 Mon Sep 17 00:00:00 2001 From: Benni Mack <benni@typo3.org> Date: Thu, 11 May 2017 17:41:03 +0200 Subject: [PATCH] [!!!][TASK] Drop TSFE->dtdAllowsFrames The typolink calculation for checking of allowing frames has been encapsulated in the TypoLinkBuilder extraction, so this public property is also obsolete. Resolves: #81198 Releases: master Change-Id: Ic2d0e64a754da983abfd6c9bcaa66884eaa9af35 Reviewed-on: https://review.typo3.org/52782 Tested-by: TYPO3com <no-reply@typo3.com> Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl> Tested-by: Wouter Wolters <typo3@wouterwolters.nl> Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch> Tested-by: Christian Kuhn <lolli@schwarzbu.ch> --- ...g-80700-DeprecatedFunctionalityRemoved.rst | 1 + .../TypoScriptFrontendController.php | 18 -------- .../ContentObjectRendererTest.php | 20 --------- .../ContentObjectRendererTest.php | 41 ------------------- 4 files changed, 1 insertion(+), 79 deletions(-) diff --git a/typo3/sysext/core/Documentation/Changelog/master/Breaking-80700-DeprecatedFunctionalityRemoved.rst b/typo3/sysext/core/Documentation/Changelog/master/Breaking-80700-DeprecatedFunctionalityRemoved.rst index bdfd6f31954e..629e44a3db3c 100644 --- a/typo3/sysext/core/Documentation/Changelog/master/Breaking-80700-DeprecatedFunctionalityRemoved.rst +++ b/typo3/sysext/core/Documentation/Changelog/master/Breaking-80700-DeprecatedFunctionalityRemoved.rst @@ -265,6 +265,7 @@ The following public class properties have been dropped: * TYPO3\CMS\Core\Imaging\GraphicalFunctions->tempPath * TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject->parentMenuArr * TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController->compensateFieldWidth +* TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController->dtdAllowsFrames * TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController->excludeCHashVars * TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController->scriptParseTime * TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController->csConvObj diff --git a/typo3/sysext/frontend/Classes/Controller/TypoScriptFrontendController.php b/typo3/sysext/frontend/Classes/Controller/TypoScriptFrontendController.php index 11abfbc3e748..455600ac71cb 100644 --- a/typo3/sysext/frontend/Classes/Controller/TypoScriptFrontendController.php +++ b/typo3/sysext/frontend/Classes/Controller/TypoScriptFrontendController.php @@ -786,11 +786,6 @@ class TypoScriptFrontendController */ protected $requestedId; - /** - * @var bool - */ - public $dtdAllowsFrames; - /** * Class constructor * Takes a number of GET/POST input variable as arguments and stores them internally. @@ -3135,19 +3130,6 @@ class TypoScriptFrontendController $this->initializeSearchWordDataInTsfe(); // linkVars $this->calculateLinkVars(); - // dtdAllowsFrames indicates whether to use the target attribute in links - $this->dtdAllowsFrames = false; - if ($this->config['config']['doctype']) { - if (in_array( - (string)$this->config['config']['doctype'], - ['xhtml_trans', 'xhtml_basic', 'html5'], - true) - ) { - $this->dtdAllowsFrames = true; - } - } else { - $this->dtdAllowsFrames = true; - } // Setting XHTML-doctype from doctype if (!$this->config['config']['xhtmlDoctype']) { $this->config['config']['xhtmlDoctype'] = $this->config['config']['doctype']; diff --git a/typo3/sysext/frontend/Tests/Functional/ContentObject/ContentObjectRendererTest.php b/typo3/sysext/frontend/Tests/Functional/ContentObject/ContentObjectRendererTest.php index 026ff9d6f0a1..51a915d19d8a 100644 --- a/typo3/sysext/frontend/Tests/Functional/ContentObject/ContentObjectRendererTest.php +++ b/typo3/sysext/frontend/Tests/Functional/ContentObject/ContentObjectRendererTest.php @@ -491,23 +491,6 @@ class ContentObjectRendererTest extends \TYPO3\TestingFramework\Core\Functional\ $this->assertEquals('<a href="#content">Page title</a>', $subject->typoLink('', $configuration)); } - /** - * @return array - */ - protected function getLibParseTarget() - { - return [ - 'override' => '', - 'override.' => [ - 'if.' => [ - 'isTrue.' => [ - 'data' => 'TSFE:dtdAllowsFrames', - ], - ], - ], - ]; - } - /** * @return array */ @@ -519,7 +502,6 @@ class ContentObjectRendererTest extends \TYPO3\TestingFramework\Core\Functional\ 'http.' => [ 'keep' => '{$styles.content.links.keep}', 'extTarget' => '', - 'extTarget.' => $this->getLibParseTarget(), 'mailto.' => [ 'keep' => 'path', ], @@ -533,8 +515,6 @@ class ContentObjectRendererTest extends \TYPO3\TestingFramework\Core\Functional\ 'parameter.' => [ 'data' => 'parameters : allParams', ], - 'extTarget.' => $this->getLibParseTarget(), - 'target.' => $this->getLibParseTarget(), ], 'parseFunc.' => [ 'constants' => '1', diff --git a/typo3/sysext/frontend/Tests/Unit/ContentObject/ContentObjectRendererTest.php b/typo3/sysext/frontend/Tests/Unit/ContentObject/ContentObjectRendererTest.php index b8f41d78fd3c..270e0176bed1 100644 --- a/typo3/sysext/frontend/Tests/Unit/ContentObject/ContentObjectRendererTest.php +++ b/typo3/sysext/frontend/Tests/Unit/ContentObject/ContentObjectRendererTest.php @@ -2296,23 +2296,6 @@ class ContentObjectRendererTest extends \TYPO3\TestingFramework\Core\Unit\UnitTe return $contentObjectFixture; } - /** - * @return array - */ - protected function getLibParseTarget() - { - return [ - 'override' => '', - 'override.' => [ - 'if.' => [ - 'isTrue.' => [ - 'data' => 'TSFE:dtdAllowsFrames', - ], - ], - ], - ]; - } - /** * @return array */ @@ -2324,7 +2307,6 @@ class ContentObjectRendererTest extends \TYPO3\TestingFramework\Core\Unit\UnitTe 'http.' => [ 'keep' => '{$styles.content.links.keep}', 'extTarget' => '', - 'extTarget.' => $this->getLibParseTarget(), 'mailto.' => [ 'keep' => 'path', ], @@ -2338,8 +2320,6 @@ class ContentObjectRendererTest extends \TYPO3\TestingFramework\Core\Unit\UnitTe 'parameter.' => [ 'data' => 'parameters : allParams', ], - 'extTarget.' => $this->getLibParseTarget(), - 'target.' => $this->getLibParseTarget(), ], 'parseFunc.' => [ 'constants' => '1', @@ -2464,13 +2444,6 @@ class ContentObjectRendererTest extends \TYPO3\TestingFramework\Core\Unit\UnitTe 'http.' => [ 'extTarget.' => [ 'override' => '_blank', - 'override.' => [ - 'if.' => [ - 'isTrue.' => [ - 'data' => 'TSFE:dtdAllowsFrames', - ], - ], - ], ], 'keep' => 'path', ], @@ -2511,26 +2484,12 @@ class ContentObjectRendererTest extends \TYPO3\TestingFramework\Core\Unit\UnitTe 'typolink.' => [ 'extTarget.' => [ 'override' => '', - 'override.' => [ - 'if.' => [ - 'isTrue.' => [ - 'data' => 'TSFE:dtdAllowsFrames', - ], - ], - ], ], 'parameter.' => [ 'data' => 'parameters : allParams', ], 'target.' => [ 'override' => '', - 'override.' => [ - 'if.' => [ - 'isTrue.' => [ - 'data' => 'TSFE:dtdAllowsFrames', - ], - ], - ], ], ], ], -- GitLab