[BUGFIX] ElementBrowser: Show triggered flash messages 14/36914/2
authorNicole Cordes <typo3@cordes.co>
Sat, 14 Feb 2015 20:57:01 +0000 (21:57 +0100)
committerWouter Wolters <typo3@wouterwolters.nl>
Sat, 14 Feb 2015 23:12:01 +0000 (00:12 +0100)
If you try to add a new folder with empty name or an error during the
file upload happens, a FlashMessage is generated and added to the
FlashMessageQueue but not display within the ElementBrowser. The patch
adds output of the FlashMessageQueue above the navigation.

Releases: master, 6.2
Resolves: #65075
Change-Id: I9196fce917893ff04aad55a7f96c57a0b09f4fc3
Reviewed-on: http://review.typo3.org/36914
Reviewed-by: Markus Klein <klein.t3@reelworx.at>
Reviewed-by: Michael Oehlhof <typo3@oehlhof.de>
Tested-by: Michael Oehlhof <typo3@oehlhof.de>
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: Wouter Wolters <typo3@wouterwolters.nl>
typo3/sysext/recordlist/Classes/Browser/ElementBrowser.php

index 8cb7e52..7f1333f 100644 (file)
@@ -854,6 +854,8 @@ class ElementBrowser {
        public function main_rte($wiz = FALSE) {
                // Starting content:
                $content = $this->doc->startPage('RTE link');
+               // Add the FlashMessages if any
+               $content .= $this->doc->getFlashMessages();
 
                $allowedItems = $this->getAllowedItems('page,file,folder,url,mail,spec');
 
@@ -1459,6 +1461,8 @@ class ElementBrowser {
                $this->doc->getDragDropCode('folders', 'Tree.ajaxID = "SC_alt_file_navframe::expandCollapse"');
                // Starting content:
                $content = $this->doc->startPage('TBE file selector');
+               // Add the FlashMessages if any
+               $content .= $this->doc->getFlashMessages();
                // Init variable:
                $pArr = explode('|', $this->bparams);
                // The key number 3 of the pArr contains the "allowed" string. Disallowed is not passed to
@@ -1545,8 +1549,6 @@ class ElementBrowser {
                } else {
                        $files = '';
                }
-               // Add the FlashMessages if any
-               $content .= $this->doc->getFlashMessages();
 
                // Putting the parts together, side by side:
                $content .= '
@@ -1591,6 +1593,8 @@ class ElementBrowser {
                $this->doc->getDragDropCode('folders', 'Tree.ajaxID = "SC_alt_file_navframe::expandCollapse";');
                // Starting content:
                $content = $this->doc->startPage('TBE folder selector');
+               // Add the FlashMessages if any
+               $content .= $this->doc->getFlashMessages();
                // Init variable:
                $parameters = explode('|', $this->bparams);
                if ($this->expandFolder) {
@@ -2721,4 +2725,4 @@ class ElementBrowser {
                return $GLOBALS['TYPO3_DB'];
        }
 
-}
\ No newline at end of file
+}