[BUGFIX] Folder::getFiles directly calls Factory::createFileObject
Folder::getFiles implements the logic of creating file objects itself, after retrieving the information from the driver. Besides the fact that this is slow since all information for the object are received from the filesystem directly instead of the cache in the sys_file table the uid is not present in these objects which finally results in the lack of metadata in these file objects. In addition to that ommiting the ResourceFactory several objects for the same file might exists which may lead to inconsistent behaviour and output on modifying the file. As the Folder/File Objects only should be a convinience facade in front of the ResourceStorage this change introduces a new method their, implementing the new and improved logic. At the same time the old functionality - which enforces manual file object creation - has been deprecated and the filelist module is adapted accordingly. Releases: 6.2 Resolves: #53688 Change-Id: I3fb97d432d325bd6400c0ae208b90d702c9f528d Reviewed-on: https://review.typo3.org/26360 Reviewed-by: Frans Saris Tested-by: Frans Saris Reviewed-by: Steffen Ritter Tested-by: Steffen Ritter
Showing
- typo3/sysext/core/Classes/Resource/Folder.php 2 additions, 16 deletionstypo3/sysext/core/Classes/Resource/Folder.php
- typo3/sysext/core/Classes/Resource/ResourceStorage.php 40 additions, 2 deletionstypo3/sysext/core/Classes/Resource/ResourceStorage.php
- typo3/sysext/core/Tests/Unit/Resource/FolderTest.php 5 additions, 5 deletionstypo3/sysext/core/Tests/Unit/Resource/FolderTest.php
- typo3/sysext/filelist/Classes/FileList.php 5 additions, 4 deletionstypo3/sysext/filelist/Classes/FileList.php
Please register or sign in to comment