[BUGFIX] getFileIndexRecordsForFolder only works for hierarchical path 57/26357/3
authorSteffen Ritter <info@rs-websystems.de>
Thu, 12 Dec 2013 16:08:21 +0000 (17:08 +0100)
committerSteffen Ritter <info@rs-websystems.de>
Sat, 21 Dec 2013 10:02:49 +0000 (11:02 +0100)
commitb100e06f68406729a9f884ba5ab0aab37867a58b
tree686427ce02c7c9e97f63ded15c1e124629259571
parent2a392e44c3ce7f21dacf7cb1eb11531be077e31f
[BUGFIX] getFileIndexRecordsForFolder only works for hierarchical path

The method FileRepository::getFileIndexRecordsForFolder
retrieves the Index Records for files in a given folder using a
LIKE-query. This basically checks if the identifier of the a
folder is part of the identifier of the file.

This concept has several drawbacks. First not all storages are
hierarchical, second this will fail if there is a different
directory seperator than / and finally this fetches records
for the folder recursively which may result in a huge amount of
data if for example the root folder of an storage is queried.

In addition the method resides in the FileRepository while it
retrieves IndexRecords - which is a different concern.

This change introduces the function within the
FileIndexRepository and uses the folder_hash (introduced in
https://review.typo3.org/23398) to query for the files.

The old method is deprecated now, calls the new method and
all core-usages of the old function have been rewritten to
use the new functionality.

Releases: 6.2
Resolves: #53687
Change-Id: Icabf2350192c93951f2277f3aa7468fe958bfabf
Reviewed-on: https://review.typo3.org/26357
Reviewed-by: Frans Saris
Tested-by: Frans Saris
Reviewed-by: Steffen Ritter
Tested-by: Steffen Ritter
typo3/sysext/core/Classes/Resource/FileRepository.php
typo3/sysext/core/Classes/Resource/Index/FileIndexRepository.php
typo3/sysext/core/Classes/Resource/ResourceStorage.php
typo3/sysext/core/Classes/Resource/Service/IndexerService.php
typo3/sysext/core/ext_tables.sql