[BUGFIX] Add missing back reference for file trees 83/42883/4
authorMarkus Klein <markus.klein@typo3.org>
Wed, 26 Aug 2015 19:07:33 +0000 (21:07 +0200)
committerWouter Wolters <typo3@wouterwolters.nl>
Thu, 27 Aug 2015 07:11:36 +0000 (09:11 +0200)
The ElementBrowserFolderTreeView class needs a back reference
to the ElementBrowser as well.
This was forgotten in #69276.

Resolves: #69322
Releases: master
Change-Id: I9722b2cc39e927aa32e318551f47ad4abc5a18a6
Reviewed-on: http://review.typo3.org/42883
Reviewed-by: Sebastian Michaelsen <michaelsen@t3seo.de>
Tested-by: Sebastian Michaelsen <michaelsen@t3seo.de>
Reviewed-by: Daniel Maier <dani-maier@gmx.de>
Tested-by: Daniel Maier <dani-maier@gmx.de>
Reviewed-by: Daniel Goerz <ervaude@gmail.com>
Tested-by: Daniel Goerz <ervaude@gmail.com>
Reviewed-by: Stephan GroƟberndt <stephan@grossberndt.de>
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: Wouter Wolters <typo3@wouterwolters.nl>
typo3/sysext/recordlist/Classes/Browser/ElementBrowser.php
typo3/sysext/rtehtmlarea/Classes/SelectImage.php

index 9553333..76fad69 100755 (executable)
@@ -1198,6 +1198,7 @@ class ElementBrowser {
        protected function getFileSelectorHtml($treeClassName = ElementBrowserFolderTreeView::class) {
                /** @var ElementBrowserFolderTreeView $folderTree */
                $folderTree = GeneralUtility::makeInstance($treeClassName);
+               $folderTree->setElementBrowser($this);
                $folderTree->thisScript = $this->thisScript;
                $tree = $folderTree->getBrowsableTree();
                $backendUser = $this->getBackendUser();
@@ -1471,6 +1472,7 @@ class ElementBrowser {
                // Create folder tree:
                /** @var ElementBrowserFolderTreeView $folderTree */
                $folderTree = GeneralUtility::makeInstance(ElementBrowserFolderTreeView::class);
+               $folderTree->setElementBrowser($this);
                $folderTree->thisScript = $this->thisScript;
                $folderTree->ext_noTempRecyclerDirs = $this->mode === 'filedrag';
                $tree = $folderTree->getBrowsableTree();
@@ -1542,6 +1544,7 @@ class ElementBrowser {
                // Create folder tree:
                /** @var ElementBrowserFolderTreeView $folderTree */
                $folderTree = GeneralUtility::makeInstance(ElementBrowserFolderTreeView::class);
+               $folderTree->setElementBrowser($this);
                $folderTree->thisScript = $this->thisScript;
                $folderTree->ext_noTempRecyclerDirs = $this->mode === 'filedrag';
                $tree = $folderTree->getBrowsableTree();
index 4c1247a..d5c594b 100644 (file)
@@ -528,6 +528,7 @@ plugin.insertImage(imageTags.join(\' \'));
                                break;
                        case 'dragdrop':
                                $foldertree = GeneralUtility::makeInstance(ElementBrowserFolderTreeView::class);
+                               $foldertree->setElementBrowser($this);
                                $foldertree->thisScript = $this->thisScript;
                                $foldertree->ext_noTempRecyclerDirs = TRUE;
                                $tree = $foldertree->getBrowsableTree();