[BUGFIX] Folder::getFiles directly calls Factory::createFileObject 60/26360/2
authorSteffen Ritter <info@rs-websystems.de>
Thu, 12 Dec 2013 18:50:26 +0000 (19:50 +0100)
committerSteffen Ritter <info@rs-websystems.de>
Sat, 21 Dec 2013 10:03:36 +0000 (11:03 +0100)
commit28b91ac69752be61586f52a0e0b4bf59ba7eb921
tree53d97b56e535d7b3b20e0c3f2d2f106d41ff6118
parentb100e06f68406729a9f884ba5ab0aab37867a58b
[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
typo3/sysext/core/Classes/Resource/Folder.php
typo3/sysext/core/Classes/Resource/ResourceStorage.php
typo3/sysext/core/Tests/Unit/Resource/FolderTest.php
typo3/sysext/filelist/Classes/FileList.php