[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
Showing
- typo3/sysext/core/Classes/Resource/FileRepository.php 3 additions, 16 deletionstypo3/sysext/core/Classes/Resource/FileRepository.php
- typo3/sysext/core/Classes/Resource/Index/FileIndexRepository.php 19 additions, 0 deletions...ysext/core/Classes/Resource/Index/FileIndexRepository.php
- typo3/sysext/core/Classes/Resource/ResourceStorage.php 1 addition, 1 deletiontypo3/sysext/core/Classes/Resource/ResourceStorage.php
- typo3/sysext/core/Classes/Resource/Service/IndexerService.php 2 additions, 1 deletion...3/sysext/core/Classes/Resource/Service/IndexerService.php
- typo3/sysext/core/ext_tables.sql 1 addition, 0 deletionstypo3/sysext/core/ext_tables.sql
Please register or sign in to comment