[BUGFIX] Module recordlist: Removed call to deprecated method render() 08/46908/2
authorMichael Oehlhof <typo3@oehlhof.de>
Wed, 24 Feb 2016 23:15:30 +0000 (00:15 +0100)
committerChristian Kuhn <lolli@schwarzbu.ch>
Fri, 26 Feb 2016 12:48:20 +0000 (13:48 +0100)
Call of FlashMessage->render() was replaced with appropriate code if
a temporary mount point is set in DatabaseBrowser and PageLinkHandler.

Resolves: #73661
Releases: master, 7.6
Change-Id: If11b9b1a6447807ff9e567b2288c198fa0eea961
Reviewed-on: https://review.typo3.org/46908
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
typo3/sysext/recordlist/Classes/Browser/DatabaseBrowser.php
typo3/sysext/recordlist/Classes/LinkHandler/PageLinkHandler.php

index 34ca510..39fb568 100644 (file)
@@ -17,7 +17,6 @@ namespace TYPO3\CMS\Recordlist\Browser;
 use TYPO3\CMS\Backend\RecordList\ElementBrowserRecordList;
 use TYPO3\CMS\Backend\Utility\BackendUtility;
 use TYPO3\CMS\Core\Imaging\Icon;
-use TYPO3\CMS\Core\Messaging\FlashMessage;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
 use TYPO3\CMS\Core\Utility\MathUtility;
 use TYPO3\CMS\Recordlist\Tree\View\ElementBrowserPageTreeView;
@@ -151,10 +150,10 @@ class DatabaseBrowser extends AbstractElementBrowser implements ElementBrowserIn
         if ((int)$this->getBackendUser()->getSessionData('pageTree_temporaryMountPoint') === 0) {
             return '';
         }
-        $link = '<a href="' . htmlspecialchars(GeneralUtility::linkThisScript(array('setTempDBmount' => 0))) . '">'
-            . $this->getLanguageService()->sl('LLL:EXT:lang/locallang_core.xlf:labels.temporaryDBmount', true) . '</a>';
+        $link = '<p><a href="' . htmlspecialchars(GeneralUtility::linkThisScript(array('setTempDBmount' => 0))) . '" class="btn btn-primary">'
+            . $this->getLanguageService()->sl('LLL:EXT:lang/locallang_core.xlf:labels.temporaryDBmount', true) . '</a></p>';
 
-        return GeneralUtility::makeInstance(FlashMessage::class, $link, '', FlashMessage::INFO)->render();
+        return $link;
     }
 
     /**
index f2ff566..028101d 100644 (file)
@@ -19,7 +19,6 @@ use TYPO3\CMS\Backend\Tree\View\ElementBrowserPageTreeView;
 use TYPO3\CMS\Backend\Utility\BackendUtility;
 use TYPO3\CMS\Core\Database\DatabaseConnection;
 use TYPO3\CMS\Core\Imaging\Icon;
-use TYPO3\CMS\Core\Messaging\FlashMessage;
 use TYPO3\CMS\Core\Page\PageRenderer;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
 use TYPO3\CMS\Core\Utility\MathUtility;
@@ -228,10 +227,9 @@ class PageLinkHandler extends AbstractLinkHandler implements LinkHandlerInterfac
         if ((int)$this->getBackendUser()->getSessionData('pageTree_temporaryMountPoint') === 0) {
             return '';
         }
-        $link = '<a href="' . htmlspecialchars(GeneralUtility::linkThisScript(array('setTempDBmount' => 0))) . '">'
-            . $this->getLanguageService()->sL('LLL:EXT:lang/locallang_core.xlf:labels.temporaryDBmount', true) . '</a>';
-
-        return GeneralUtility::makeInstance(FlashMessage::class, $link, '', FlashMessage::INFO)->render();
+        $link = '<p><a href="' . htmlspecialchars(GeneralUtility::linkThisScript(array('setTempDBmount' => 0))) . '" class="btn btn-primary">'
+            . $this->getLanguageService()->sL('LLL:EXT:lang/locallang_core.xlf:labels.temporaryDBmount', true) . '</a></p>';
+        return $link;
     }
 
     /**