[BUGFIX] Do not show exeption when folder is not accesible 89/27189/6
authorIngo Schmitt <is@marketing-factory.de>
Fri, 31 Jan 2014 12:55:45 +0000 (13:55 +0100)
committerSteffen Ritter <info@rs-websystems.de>
Fri, 31 Jan 2014 13:57:03 +0000 (14:57 +0100)
When a storage folder is not accessible for the user a exception
is displayed. Same if the folder is missing.

This patch changes the exception to
\TYPO3\CMS\Core\Resource\Exception.

The user will get a flash message and FAL tries to display the
parent folder of the restricted folder. If the folder is
missing the parent folder is displayed.

Resolves: #51762, #51319
Releases: 6.2
Change-Id: I1fb930f8c13049eeddb27521326f1d0fc8707933
Reviewed-on: https://review.typo3.org/27189
Reviewed-by: Steffen Ritter
Tested-by: Steffen Ritter
typo3/sysext/filelist/Classes/Controller/FileListController.php

index 3f6f631..ce2bbc4 100644 (file)
@@ -170,7 +170,7 @@ class FileListController {
                                        throw new \RuntimeException('Could not find any folder to be displayed.', 1349276894);
                                }
                        }
-               } catch (\TYPO3\CMS\Core\Resource\Exception\FolderDoesNotExistException $fileException) {
+               } catch (\TYPO3\CMS\Core\Resource\Exception $fileException) {
                        // Take the first object of the first storage
                        $fileStorages = $GLOBALS['BE_USER']->getFileStorages();
                        $fileStorage = reset($fileStorages);