From 77d74302159723b10d1e06e06c75b244e441f167 Mon Sep 17 00:00:00 2001 From: Wouter Wolters <typo3@wouterwolters.nl> Date: Fri, 11 Nov 2016 19:57:29 +0100 Subject: [PATCH] [TASK] Remove undefined property iconFactory from EditFileController The property is not defined at all. We can retrieve the iconFactory from the moduleTemplate. Resolves: #78662 Releases: master Change-Id: Id51ac702b9a9e57d731014e86e1637632aadcb38 Reviewed-on: https://review.typo3.org/50597 Reviewed-by: Frank Naegler <frank.naegler@typo3.org> Tested-by: Frank Naegler <frank.naegler@typo3.org> Reviewed-by: Georg Ringer <georg.ringer@gmail.com> Tested-by: Georg Ringer <georg.ringer@gmail.com> --- .../backend/Classes/Controller/File/EditFileController.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/typo3/sysext/backend/Classes/Controller/File/EditFileController.php b/typo3/sysext/backend/Classes/Controller/File/EditFileController.php index 5bad23a0c3fb..4a041ab29384 100644 --- a/typo3/sysext/backend/Classes/Controller/File/EditFileController.php +++ b/typo3/sysext/backend/Classes/Controller/File/EditFileController.php @@ -21,7 +21,6 @@ use TYPO3\CMS\Backend\Template\Components\ButtonBar; use TYPO3\CMS\Backend\Template\DocumentTemplate; use TYPO3\CMS\Backend\Utility\BackendUtility; use TYPO3\CMS\Core\Imaging\Icon; -use TYPO3\CMS\Core\Imaging\IconFactory; use TYPO3\CMS\Core\Resource\Exception\InsufficientFileAccessPermissionsException; use TYPO3\CMS\Core\Resource\ResourceFactory; use TYPO3\CMS\Core\Utility\GeneralUtility; @@ -84,7 +83,6 @@ class EditFileController extends AbstractModule public function __construct() { parent::__construct(); - $this->iconFactory = GeneralUtility::makeInstance(IconFactory::class); $GLOBALS['SOBE'] = $this; $this->init(); } @@ -120,7 +118,7 @@ class EditFileController extends AbstractModule } // Setting the title and the icon - $icon = $this->iconFactory->getIcon('apps-filetree-root', Icon::SIZE_SMALL)->render(); + $icon = $this->moduleTemplate->getIconFactory()->getIcon('apps-filetree-root', Icon::SIZE_SMALL)->render(); $this->title = $icon . htmlspecialchars( $this->fileObject->getStorage()->getName() -- GitLab