Commit a02928f5 authored by Pierrick Caillon's avatar Pierrick Caillon Committed by Oliver Hader
Browse files

[BUGFIX] Reset query filters for file storages

After query filers for file storages have been used, those settings
have to be reset. `StorageRepository::$storageInstances` actually
applies an implicit singleton pattern to file storage objects.

Resolves: #94714
Releases: master, 11.3, 10.4, 9.5
Change-Id: I353b782f8e98c55df6f9cb2e14a0745d83bfdc70
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/70297


Tested-by: core-ci's avatarcore-ci <typo3@b13.com>
Tested-by: Oliver Hader's avatarOliver Hader <oliver.hader@typo3.org>
Reviewed-by: Oliver Hader's avatarOliver Hader <oliver.hader@typo3.org>
parent d9fb666a
......@@ -384,9 +384,8 @@ class FormPersistenceManager implements FormPersistenceManagerInterface
foreach ($this->getAccessibleFormStorageFolders() as $folder) {
$storage = $folder->getStorage();
$storage->addFileAndFolderNameFilter([
$fileExtensionFilter,
'filterFileList'
$storage->setFileAndFolderNameFilters([
[$fileExtensionFilter, 'filterFileList']
]);
$files = $folder->getFiles(
......
......@@ -163,8 +163,10 @@ class SvgFilesSanitization implements UpgradeWizardInterface, ConfirmableInterfa
{
$filter = GeneralUtility::makeInstance(FileExtensionFilter::class);
$filter->setAllowedFileExtensions(['svg', 'svgz']);
return $storage
->setFileAndFolderNameFilters([[$filter, 'filterFileList']])
$files = $storage
->setFileAndFolderNameFilters([
[$filter, 'filterFileList']
])
->getFilesInFolder(
$storage->getRootLevelFolder(),
0,
......@@ -172,6 +174,8 @@ class SvgFilesSanitization implements UpgradeWizardInterface, ConfirmableInterfa
true,
true
);
$storage->resetFileAndFolderNameFiltersToDefault();
return $files;
}
protected function processSvgFiles(): bool
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment