Skip to content

Commit

Permalink
[BUGFIX] Fix search in file list mount points
Browse files Browse the repository at this point in the history
In case of the first mount point of a storage in file list
\TYPO3\CMS\Core\Resource\ResourceStorage::getRootLevelFolder()
returns always the first mount point folder and not the real root
folder. This causes, that the condition is always true in case
of first mount point. If the condition is true, no folder restriction
is added. If no folder restriction is added the search is
done in the whole storage and not only in the selected folder.
With disrespecting the mount points this method always returns
the real root folder and the condition is only true if the selected
folder is the storage root folder. This means a folder restriction
is added in other cases.

Resolves: #88175
Releases: master, 9.5
Change-Id: I2e9d52fac71f7f37784a05656574d0a9267d28f7
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/62872
Tested-by: TYPO3com <noreply@typo3.com>
Tested-by: Sascha Rademacher <sascha.rademacher+typo3@gmail.com>
Tested-by: Felix P. <f.pachowsky@neusta.de>
Tested-by: Steffen Frese <steffenf14@gmail.com>
Tested-by: Tobi Kretschmann <tobi@tobishome.de>
Reviewed-by: Sascha Rademacher <sascha.rademacher+typo3@gmail.com>
Reviewed-by: Felix P. <f.pachowsky@neusta.de>
Reviewed-by: Steffen Frese <steffenf14@gmail.com>
Reviewed-by: Tobi Kretschmann <tobi@tobishome.de>
  • Loading branch information
DrWh0286 authored and d3pendent committed Jan 17, 2020
1 parent 0311f67 commit 36f33ef
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -51,7 +51,7 @@ private function populateRestrictions(): void
$this->add($this->createFolderRestriction());
return;
}
if ($this->folder->getIdentifier() === $storage->getRootLevelFolder()->getIdentifier()) {
if ($this->folder->getIdentifier() === $storage->getRootLevelFolder(false)->getIdentifier()) {
return;
}
if ($storage->hasHierarchicalIdentifiers()) {
Expand Down

0 comments on commit 36f33ef

Please sign in to comment.