Skip to content
Snippets Groups Projects
Commit f7663d18 authored by Michael Oehlhof's avatar Michael Oehlhof Committed by Stefan Neufeind
Browse files

[BUGFIX] MetaInformation: Catch InsufficientFolderAccessPermissionsException

Resolves: #70815
Releases: master
Change-Id: I31dcabdc34bfff8bd1d992dc7cbeb2e8bc0839c8
Reviewed-on: http://review.typo3.org/44130


Reviewed-by: default avatarDaniel Goerz <ervaude@gmail.com>
Tested-by: default avatarDaniel Goerz <ervaude@gmail.com>
Reviewed-by: default avatarStefan Neufeind <typo3.neufeind@speedpartner.de>
Tested-by: default avatarStefan Neufeind <typo3.neufeind@speedpartner.de>
parent 11813849
Branches
Tags
No related merge requests found
......@@ -14,6 +14,7 @@ namespace TYPO3\CMS\Backend\Template\Components;
* The TYPO3 project - inspiring people to share!
*/
use TYPO3\CMS\Core\Resource\Exception\InsufficientFolderAccessPermissionsException;
use TYPO3\CMS\Core\Resource\Exception\ResourceDoesNotExistException;
use TYPO3\CMS\Core\Resource\Folder;
use TYPO3\CMS\Core\Resource\FolderInterface;
......@@ -74,7 +75,9 @@ class MetaInformation
$resourceObject = ResourceFactory::getInstance()->getInstance()->getObjectFromCombinedIdentifier($pageRecord['combined_identifier']);
$title = $resourceObject->getStorage()->getName() . ':';
$title .= $resourceObject->getParentFolder()->getReadablePath();
} catch (ResourceDoesNotExistException $e) {}
} catch (ResourceDoesNotExistException $e) {
} catch (InsufficientFolderAccessPermissionsException $e) {
}
}
// Setting the path of the page
// crop the title to title limit (or 50, if not defined)
......@@ -100,6 +103,7 @@ class MetaInformation
$moduleTemplate = GeneralUtility::makeInstance(ModuleTemplate::class);
$pageRecord = $this->recordArray;
$uid = '';
$title = '';
$additionalInfo = (!empty($pageRecord['_additional_info']) ? $pageRecord['_additional_info'] : '');
// Add icon with clickMenu, etc:
// If there IS a real page
......@@ -114,7 +118,8 @@ class MetaInformation
} elseif (is_array($pageRecord) && !empty($pageRecord['combined_identifier'])) {
try {
$resourceObject = ResourceFactory::getInstance()->getInstance()->getObjectFromCombinedIdentifier($pageRecord['combined_identifier']);
$title = $resourceObject->getName();
$fileMountTitle = $resourceObject->getStorage()->getFileMounts()[$resourceObject->getIdentifier()]['title'];
$title = $fileMountTitle ?: $resourceObject->getName();
// If this is a folder but not in within file mount boundaries this is the root folder
if ($resourceObject instanceof FolderInterface && !$resourceObject->getStorage()->isWithinFileMountBoundaries($resourceObject)) {
$iconImg = '<span title="' . htmlspecialchars($title) . '">' . $iconFactory->getIconForResource(
......
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