From 8babd248b016d054a1164e9424abb0ff6154420e Mon Sep 17 00:00:00 2001 From: Anja Leichsenring <aleichsenring@ab-softlab.de> Date: Mon, 17 Apr 2023 07:04:42 +0200 Subject: [PATCH] [TASK] Avoid usage of includeLLFile() in ext:backend Tree View All usage of globally loaded labels has been replaced, so the usage of the function to load the labels globally can safely be removed. Resolves: #100627 Releases: main Change-Id: Iaac8c84bd1bf951703a38176e9b634da44df42a5 Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/78674 Tested-by: core-ci <typo3@b13.com> Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch> Tested-by: Benni Mack <benni@typo3.org> Tested-by: Christian Kuhn <lolli@schwarzbu.ch> Reviewed-by: Benni Mack <benni@typo3.org> --- .../Classes/Tree/View/AbstractContentPagePositionMap.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/typo3/sysext/backend/Classes/Tree/View/AbstractContentPagePositionMap.php b/typo3/sysext/backend/Classes/Tree/View/AbstractContentPagePositionMap.php index 3780a2b4ec1a..18bdaf814198 100644 --- a/typo3/sysext/backend/Classes/Tree/View/AbstractContentPagePositionMap.php +++ b/typo3/sysext/backend/Classes/Tree/View/AbstractContentPagePositionMap.php @@ -133,7 +133,6 @@ abstract class AbstractContentPagePositionMap protected function printRecordMap(array $lines, array $tcaColumnsConfiguration, int $pid): string { $lang = $this->getLanguageService(); - $lang->includeLLFile('EXT:backend/Resources/Private/Language/locallang_layout.xlf'); $hideRestrictedColumns = (bool)(BackendUtility::getPagesTSconfig($pid)['mod.']['web_layout.']['hideRestrictedCols'] ?? false); $backendLayout = $this->backendLayoutView->getSelectedBackendLayout($pid); @@ -196,7 +195,7 @@ abstract class AbstractContentPagePositionMap } else { $cellContent = ' <p> - ' . $columnTitle . ' <em>(' . htmlspecialchars($lang->getLL('noAccess')) . ')</em> + ' . $columnTitle . ' <em>(' . htmlspecialchars($lang->sL('LLL:EXT:backend/Resources/Private/Language/locallang_layout.xlf:noAccess')) . ')</em> </p>'; $tableCellAttributes['class'] .= ' bg-danger bg-opacity-25'; } @@ -208,7 +207,7 @@ abstract class AbstractContentPagePositionMap $cellContent = ' <em> ' . htmlspecialchars($lang->sL($columnConfig['name']) ?: '') . ' - ' . ' (' . htmlspecialchars($lang->getLL('notAssigned')) . ')' . ' + ' . ' (' . htmlspecialchars($lang->sL('LLL:EXT:backend/Resources/Private/Language/locallang_layout.xlf:notAssigned')) . ')' . ' </em>'; $tableCellAttributes['class'] .= ' bg-warning bg-opacity-25'; } @@ -250,7 +249,7 @@ abstract class AbstractContentPagePositionMap $tableCellClasses .= ' bg-danger bg-opacity-25'; $cellContent = ' <p> - ' . $columnTitle . ' <em>(' . htmlspecialchars($lang->getLL('noAccess')) . ')</em> + ' . $columnTitle . ' <em>(' . htmlspecialchars($lang->sL('LLL:EXT:backend/Resources/Private/Language/locallang_layout.xlf:noAccess')) . ')</em> </p>'; } else { // If not restricted, wrap column title and render list (if available) -- GitLab