[BUGFIX] Don't show clickmenu icon in ElementBrowser 87/41987/2
authorMarkus Klein <markus.klein@typo3.org>
Mon, 27 Jul 2015 17:10:34 +0000 (19:10 +0200)
committerFrank Nägler <frank.naegler@typo3.org>
Mon, 27 Jul 2015 20:04:31 +0000 (22:04 +0200)
Releases: master
Resolves: #68560
Change-Id: I424e8851b33b63df71a040b9c208529ce1e80278
Reviewed-on: http://review.typo3.org/41987
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: Wouter Wolters <typo3@wouterwolters.nl>
Reviewed-by: Andreas Fernandez <typo3@scripting-base.de>
Reviewed-by: Tomas Norre Mikkelsen <tomasnorre@gmail.com>
Reviewed-by: Frank Nägler <frank.naegler@typo3.org>
Tested-by: Frank Nägler <frank.naegler@typo3.org>
typo3/sysext/backend/Classes/Controller/FileSystemNavigationFrameController.php

index f54dedc..19ae9b4 100644 (file)
@@ -14,6 +14,7 @@ namespace TYPO3\CMS\Backend\Controller;
  * The TYPO3 project - inspiring people to share!
  */
 
+use TYPO3\CMS\Backend\Tree\View\ElementBrowserFolderTreeView;
 use TYPO3\CMS\Backend\Utility\IconUtility;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
 use TYPO3\CMS\Filelist\FileListFolderTree;
@@ -100,18 +101,23 @@ class FileSystemNavigationFrameController {
 
                // Create folder tree object:
                if (!empty($this->scopeData)) {
-                       $this->foldertree = GeneralUtility::makeInstance($this->scopeData['class']);
+                       $className = $this->scopeData['class'];
+                       $this->foldertree = GeneralUtility::makeInstance($className);
                        $this->foldertree->thisScript = $this->scopeData['script'];
                        $this->foldertree->ext_noTempRecyclerDirs = $this->scopeData['ext_noTempRecyclerDirs'];
                        $GLOBALS['SOBE']->browser = new \stdClass();
                        $GLOBALS['SOBE']->browser->mode = $this->scopeData['browser']['mode'];
                        $GLOBALS['SOBE']->browser->act = $this->scopeData['browser']['act'];
                } else {
-                       $this->foldertree = GeneralUtility::makeInstance(FileListFolderTree::class);
+                       $className = FileListFolderTree::class;
+                       $this->foldertree = GeneralUtility::makeInstance($className);
                        $this->foldertree->thisScript = BackendUtility::getModuleUrl('file_navframe');
                }
-
-               $this->foldertree->ext_IconMode = $this->getBackendUser()->getTSConfigVal('options.folderTree.disableIconLinkToContextmenu');
+               // Only set ext_IconMode if we are not running an ajax request from the ElementBrowser,
+               // which has this property hardcoded to 1.
+               if ($className !== ElementBrowserFolderTreeView::class) {
+                       $this->foldertree->ext_IconMode = $this->getBackendUser()->getTSConfigVal('options.folderTree.disableIconLinkToContextmenu');
+               }
        }
 
        /**