[TASK] Improve show_item for FAL files
authorGeorg Ringer <georg.ringer@gmail.com>
Sun, 23 Sep 2012 12:57:16 +0000 (14:57 +0200)
committerAndreas Wolf <andreas.wolf@ikt-werk.de>
Thu, 4 Oct 2012 08:28:41 +0000 (10:28 +0200)
The show_item.php shows some info about the selected file.
the property size is rendered twice, once in the
header section with a size (eg. 223kb) and below with
the size as byte. remote the last one.

A call to trim() can be removed as trimExplode() is used before

Change-Id: I33b0d9270bc6f81d490348c050c2b9e30c4a102c
Resolves: #41291
Releases: 6.0
Reviewed-on: http://review.typo3.org/14964
Reviewed-by: Philipp Gampe
Tested-by: Philipp Gampe
Reviewed-by: Wouter Wolters
Reviewed-by: Andreas Wolf
Tested-by: Andreas Wolf
typo3/sysext/backend/Classes/Controller/ContentElement/ElementInformationController.php

index 308f5ac..cb644a8 100644 (file)
@@ -324,8 +324,12 @@ class ElementInformationController {
                $tableRows = array();
                $showRecordFieldList = $GLOBALS['TCA'][$this->table]['interface']['showRecordFieldList'];
                $fieldList = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', $showRecordFieldList, TRUE);
                $tableRows = array();
                $showRecordFieldList = $GLOBALS['TCA'][$this->table]['interface']['showRecordFieldList'];
                $fieldList = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', $showRecordFieldList, TRUE);
+
                foreach ($fieldList as $name) {
                foreach ($fieldList as $name) {
-                       $name = trim($name);
+                       // Ignored fields
+                       if ($name === 'size') {
+                               continue;
+                       }
                        if (!isset($GLOBALS['TCA'][$this->table]['columns'][$name])) {
                                continue;
                        }
                        if (!isset($GLOBALS['TCA'][$this->table]['columns'][$name])) {
                                continue;
                        }