[BUGFIX] Only show preview of non-hidden images 35/46735/5
authorGianluigi Martino <gmartino27@gmail.com>
Tue, 16 Feb 2016 22:19:08 +0000 (23:19 +0100)
committerBenni Mack <benni@typo3.org>
Fri, 4 Mar 2016 20:52:47 +0000 (21:52 +0100)
Don't show preview of hidden images in backend e.g.
page module.

Change-Id: I11fbfdbdf9767066dbb3380b543d79c239e6c4a2
Resolves: #73481
Releases: master, 7.6
Reviewed-on: https://review.typo3.org/46735
Reviewed-by: Daniel Goerz <ervaude@gmail.com>
Tested-by: Daniel Goerz <ervaude@gmail.com>
Reviewed-by: Benni Mack <benni@typo3.org>
Tested-by: Benni Mack <benni@typo3.org>
typo3/sysext/backend/Classes/Utility/BackendUtility.php

index e8bbe37..6df390a 100755 (executable)
@@ -1442,6 +1442,10 @@ class BackendUtility
         $iconFactory = GeneralUtility::makeInstance(IconFactory::class);
         if ($fileReferences !== null) {
             foreach ($fileReferences as $fileReferenceObject) {
+                // Do not show previews of hidden references
+                if ($fileReferenceObject->getProperty('hidden')) {
+                    continue;
+                }
                 $fileObject = $fileReferenceObject->getOriginalFile();
 
                 if ($fileObject->isMissing()) {