[BUGFIX] Aboutmodules: Removed call to deprecated method render() 95/45495/3
authorMichael Oehlhof <typo3@oehlhof.de>
Sat, 26 Dec 2015 00:29:25 +0000 (01:29 +0100)
committerMorton Jonuschat <m.jonuschat@mojocode.de>
Wed, 30 Dec 2015 07:07:21 +0000 (08:07 +0100)
The call of FlashMessage->render() is removed and the message output
is done using the InfoboxViewhelper now.

Resolves: #72442
Releases: master, 7.6
Change-Id: Id4017e1b645917827d71dab76f74b0bd4eed94a8
Reviewed-on: https://review.typo3.org/45442
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: Wouter Wolters <typo3@wouterwolters.nl>
Reviewed-by: Morton Jonuschat <m.jonuschat@mojocode.de>
Tested-by: Morton Jonuschat <m.jonuschat@mojocode.de>
(cherry picked from commit 2f26f668c5eeee10a969a681a80dfd9130376f41)
Reviewed-on: https://review.typo3.org/45495

typo3/sysext/aboutmodules/Classes/Controller/ModulesController.php
typo3/sysext/aboutmodules/Resources/Private/Templates/Modules/Index.html

index 5de5f09..d9f322f 100644 (file)
@@ -16,7 +16,6 @@ namespace TYPO3\CMS\Aboutmodules\Controller;
 
 use TYPO3\CMS\Backend\Utility\BackendUtility;
 use TYPO3\CMS\Backend\View\BackendTemplateView;
-use TYPO3\CMS\Core\Messaging\FlashMessage;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
 use TYPO3\CMS\Core\Utility\PathUtility;
 use TYPO3\CMS\Extbase\Mvc\Controller\ActionController;
@@ -74,7 +73,7 @@ class ModulesController extends ActionController
     public function indexAction()
     {
         $warnings = array();
-        $contentWarnings = '';
+        $securityWarnings = '';
         // Hook for additional warnings
         if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_befunc.php']['displayWarningMessages'])) {
             foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_befunc.php']['displayWarningMessages'] as $classRef) {
@@ -90,13 +89,6 @@ class ModulesController extends ActionController
             } else {
                 $securityWarnings = '<p>' . implode('', $warnings) . '</p>';
             }
-            $securityMessage = GeneralUtility::makeInstance(
-                FlashMessage::class,
-                $securityWarnings,
-                $this->languageService->sL('LLL:EXT:lang/locallang_core.xlf:warning.header'),
-                FlashMessage::ERROR
-            );
-            $contentWarnings = '<div style="margin: 20px 0;">' . $securityMessage->render() . '</div>';
             unset($warnings);
         }
 
@@ -104,7 +96,8 @@ class ModulesController extends ActionController
             array(
                 'TYPO3Version' => TYPO3_version,
                 'copyRightNotice' => BackendUtility::TYPO3_copyRightNotice(),
-                'warningMessages' => $contentWarnings,
+                'warningMessages' => $securityWarnings,
+                'warningTitle' => $this->languageService->sL('LLL:EXT:lang/locallang_core.xlf:warning.header'),
                 'modules' => $this->getModulesData()
             )
         );
index 571a608..a2385d4 100644 (file)
@@ -10,7 +10,9 @@
                        <f:translate key="LLL:EXT:lang/locallang_alt_intro.xlf:introtext2" />
                </p>
 
-               {warningMessages -> f:format.raw()}
+               <f:if condition="{warningMessages}">
+                       <f:be.infobox title="{warningTitle}" state="2">{warningMessages -> f:format.raw()}</f:be.infobox>
+               </f:if>
 
                <f:for each="{modules}" as="mainModule">
                        <f:if condition="{mainModule.subModules}">
@@ -77,4 +79,4 @@
                </p>
 
        </div>
-</f:section>
\ No newline at end of file
+</f:section>