Task #53687

Epic #55070: Workpackages

Epic #54260: WP: FAL Missing Issues / Features / API

Story #54263: As an Integrator I want to have my metadata present at places when using files

Task #52778: No metadata shown for Folder and Category bases collections

FileRepository:getFileIndexRecordsForFolder only works for hierarchical path

Added by Steffen Ritter about 6 years ago. Updated about 2 years ago.

Status:
Closed
Priority:
Must have
Category:
File Abstraction Layer (FAL)
Target version:
Start date:
2013-11-16
Due date:
2013-12-31
% Done:

100%

Estimated time:
4.00 h
TYPO3 Version:
6.2
PHP Version:
Tags:
Complexity:
medium
Sprint Focus:

Description

Sorry for german, but I did not want to translate it all... Just for documentation purposes so its not lost

Die Art und weise wie die Query aufgebaut ist, funktioniert nur wenn das Dateisystem seine Identifier hierarchisch mit slashes trennt.

  • Im FileIndexRepository soll eine ähnliche Methode geschaffen werden, die die Daten aber über den neuen „Folder-Hash“ in der Datei-Tabelle sucht. Das ist a, wesentlich Performanter und b, funktioniert mit jedem Treiber, Parameter ist Sinnvollerweise der Folder-Hash direkt
  • Um die spätere Verwendung effizienter zu gestalten sollter der Identifier im Key des arrays stehen (letzter Parameter exec_SELECTgetRows)
  • Eventuell muss hier ein Index auf diese Spalte hinzugefügt werden.
  • Die Methode in im FileRepository soll deprecated werden, un deren Inhalt ersetzt mit einem Aufruf auf das FileIndexRepository.
  • Die Verwendung der deprecated Method soll durch die neue ersetzt werden.

Related issues

Precedes TYPO3 Core - Task #53688: ResourceFactory::createFileObject is called from Folder::getFiles directly Closed 2014-01-01 2014-02-15

Associated revisions

Revision b100e06f (diff)
Added by Steffen Ritter almost 6 years ago

[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

History

#1 Updated by Steffen Ritter about 6 years ago

  • Assignee set to Steffen Ritter

#2 Updated by Steffen Ritter about 6 years ago

  • Complexity set to medium

#3 Updated by Steffen Ritter about 6 years ago

  • Due date set to 2013-12-31
  • Estimated time set to 4.00 h

#4 Updated by Steffen Ritter about 6 years ago

  • % Done changed from 0 to 10

#5 Updated by Gerrit Code Review about 6 years ago

  • Status changed from Accepted to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/26357

#6 Updated by Steffen Ritter about 6 years ago

  • % Done changed from 10 to 70

#7 Updated by Gerrit Code Review about 6 years ago

Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/26357

#8 Updated by Steffen Ritter almost 6 years ago

  • % Done changed from 70 to 90

#9 Updated by Steffen Ritter almost 6 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 90 to 100

#10 Updated by Steffen Ritter almost 6 years ago

  • % Done changed from 100 to 90

#11 Updated by Steffen Ritter almost 6 years ago

  • % Done changed from 90 to 100

#12 Updated by Riccardo De Contardi about 2 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF