diff --git a/typo3/sysext/backend/Classes/Utility/BackendUtility.php b/typo3/sysext/backend/Classes/Utility/BackendUtility.php index 35a713c5318cecc182b5e3932896c939941c63fa..1fc6e497513daf72f91332c39cafaf9450f79749 100755 --- a/typo3/sysext/backend/Classes/Utility/BackendUtility.php +++ b/typo3/sysext/backend/Classes/Utility/BackendUtility.php @@ -60,14 +60,6 @@ class BackendUtility */ protected static $tcaTableTypeConfigurationCache = array(); - /** - * Cache the processed titles of records during runtime - * - * @var array - * @see self::getRecordTitle() - */ - protected static $recordTitleCache = array(); - /******************************************* * * SQL-related, selecting records, searching @@ -2165,11 +2157,6 @@ class BackendUtility */ public static function getRecordTitle($table, $row, $prep = false, $forceResult = true) { - $cacheIdentifier = $table . '-' . $row['uid'] . '-prep-' . (int)$prep . '-forceResult-' . (int)$forceResult; - if (isset(self::$recordTitleCache[$cacheIdentifier])) { - return self::$recordTitleCache[$cacheIdentifier]; - } - $recordTitle = ''; if (is_array($GLOBALS['TCA'][$table])) { // If configured, call userFunc @@ -2221,7 +2208,6 @@ class BackendUtility } } } - self::$recordTitleCache[$cacheIdentifier] = $recordTitle; return $recordTitle; } diff --git a/typo3/sysext/backend/Tests/Unit/Utility/BackendUtilityTest.php b/typo3/sysext/backend/Tests/Unit/Utility/BackendUtilityTest.php index 460d3c77ad460286c4d2156dc1b96b2242c7b82c..360169cd8facd09faa1e5ad5d26303915b7f576a 100644 --- a/typo3/sysext/backend/Tests/Unit/Utility/BackendUtilityTest.php +++ b/typo3/sysext/backend/Tests/Unit/Utility/BackendUtilityTest.php @@ -1034,28 +1034,6 @@ class BackendUtilityTest extends UnitTestCase $this->assertSame($expected, $subject->_call('replaceL10nModeFields', $table, $row)); } - /** - * @test - */ - public function getRecordTitleHavingLabelUserFuncCachesValue() - { - $table = 'tx_mytable'; - $row = ['uid' => 1]; - - $mock = $this->getMock('stdClass', ['labelUserFunc']); - $mock->expects($this->once())->method('labelUserFunc')->willReturn('Test'); - - // Use wrapping closure for GeneralUtility::callUserFunction() - $GLOBALS['TCA'][$table]['ctrl']['label_userFunc'] = function (&$parameters) use ($mock) { - $parameters['title'] = $mock->labelUserFunc(); - }; - - $this->assertEquals('Test', BackendUtility::getRecordTitle($table, $row)); - - // Call a second time to make sure labelUserFunc is not called again ($this->once()) - $this->assertEquals('Test', BackendUtility::getRecordTitle($table, $row)); - } - /** * @test */