From 5c34d15dba232ae9b0c66348c33dff882b6500c8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jasmina=20Lie=C3=9Fmann?= <minapokhalo+typo3@gmail.com>
Date: Wed, 18 Jan 2023 15:39:09 +0100
Subject: [PATCH] [TASK] Remove table column 'includedFiles' in 'Page Tsconfig'
 submodule on page zero

Resolves: #99600
Releases: main
Change-Id: I382c3e34729ca87e756f142ae870dad9eaacf5a0
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/77474
Tested-by: core-ci <typo3@b13.com>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Reviewed-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
---
 .../Controller/InfoPageTyposcriptConfigController.php | 11 +----------
 .../Resources/Private/Language/InfoPageTsConfig.xlf   |  3 ---
 .../Private/Partials/PageTsConfig/PageZero.html       |  2 --
 3 files changed, 1 insertion(+), 15 deletions(-)

diff --git a/typo3/sysext/info/Classes/Controller/InfoPageTyposcriptConfigController.php b/typo3/sysext/info/Classes/Controller/InfoPageTyposcriptConfigController.php
index 7eea80480f40..a1e4f2fc8846 100644
--- a/typo3/sysext/info/Classes/Controller/InfoPageTyposcriptConfigController.php
+++ b/typo3/sysext/info/Classes/Controller/InfoPageTyposcriptConfigController.php
@@ -318,16 +318,9 @@ class InfoPageTyposcriptConfigController
     protected function extractLinesFromTSConfig(array $row): array
     {
         $out = [];
-        $includeLines = 0;
         $out['uid'] = $row['uid'];
         $lines = GeneralUtility::trimExplode("\r\n", $row['TSconfig']);
-        foreach ($lines as $line) {
-            if (str_contains($line, '<INCLUDE_TYPOSCRIPT:')) {
-                $includeLines++;
-            }
-        }
-        $out['includeLines'] = $includeLines;
-        $out['writtenLines'] = (count($lines) - $includeLines);
+        $out['writtenLines'] = count($lines);
         return $out;
     }
 
@@ -356,14 +349,12 @@ class InfoPageTyposcriptConfigController
                 $line['icon'] = $this->iconFactory->getIconForRecord('pages', BackendUtility::getRecordWSOL('pages', $identifier), Icon::SIZE_SMALL)->render();
                 $line['title'] = 'ID: ' . $identifier;
                 $line['pageTitle'] = GeneralUtility::fixed_lgd_cs($title, 30);
-                $line['includedFiles'] = ($pageArray[$identifier . '_']['includeLines'] === 0 ? '' : $pageArray[$identifier . '_']['includeLines']);
                 $line['lines'] = ($pageArray[$identifier . '_']['writtenLines'] === 0 ? '' : $pageArray[$identifier . '_']['writtenLines']);
             } else {
                 $line['link'] = '';
                 $line['icon'] = $this->iconFactory->getIconForRecord('pages', BackendUtility::getRecordWSOL('pages', $identifier), Icon::SIZE_SMALL)->render();
                 $line['title'] = '';
                 $line['pageTitle'] = GeneralUtility::fixed_lgd_cs($title, 30);
-                $line['includedFiles'] = '';
                 $line['lines'] = '';
             }
             $lines[] = $line;
diff --git a/typo3/sysext/info/Resources/Private/Language/InfoPageTsConfig.xlf b/typo3/sysext/info/Resources/Private/Language/InfoPageTsConfig.xlf
index 6b9975ae69a9..6e999ebbb8fe 100644
--- a/typo3/sysext/info/Resources/Private/Language/InfoPageTsConfig.xlf
+++ b/typo3/sysext/info/Resources/Private/Language/InfoPageTsConfig.xlf
@@ -39,9 +39,6 @@
 			<trans-unit id="pageTsconfig.overview.headline" resname="pageTsconfig.overview.headline">
 				<source>Page TSconfig Overview</source>
 			</trans-unit>
-			<trans-unit id="pageTsconfig.overview.table.th.included_tsconfig_files" resname="included_tsconfig_files">
-				<source>Included Files</source>
-			</trans-unit>
 			<trans-unit id="pageTsconfig.overview.table.th.lines" resname="written_tsconfig_lines">
 				<source>Lines</source>
 			</trans-unit>
diff --git a/typo3/sysext/info/Resources/Private/Partials/PageTsConfig/PageZero.html b/typo3/sysext/info/Resources/Private/Partials/PageTsConfig/PageZero.html
index 453924d9b918..b36cb9ddc437 100644
--- a/typo3/sysext/info/Resources/Private/Partials/PageTsConfig/PageZero.html
+++ b/typo3/sysext/info/Resources/Private/Partials/PageTsConfig/PageZero.html
@@ -18,7 +18,6 @@
                 <thead>
                     <tr>
                         <th>{f:translate(key: 'LLL:EXT:info/Resources/Private/Language/InfoPageTsConfig.xlf:pageTsconfig.overview.table.th.pagename')}</th>
-                        <th>{f:translate(key: 'LLL:EXT:info/Resources/Private/Language/InfoPageTsConfig.xlf:pageTsconfig.overview.table.th.included_tsconfig_files')}</th>
                         <th>{f:translate(key: 'LLL:EXT:info/Resources/Private/Language/InfoPageTsConfig.xlf:pageTsconfig.overview.table.th.lines')}</th>
                     </tr>
                 </thead>
@@ -39,7 +38,6 @@
                                     </f:else>
                                 </f:if>
                             </td>
-                            <td>{line.includedFiles}</td>
                             <td>{line.lines}</td>
                         </tr>
                     </f:for>
-- 
GitLab