[BUGFIX] Respect config.disablePreviewNotification 71/61171/3
authorGerrit Mohrmann <mohrmann.t3@gmx.de>
Sat, 29 Jun 2019 11:44:12 +0000 (13:44 +0200)
committerBenni Mack <benni@typo3.org>
Sat, 13 Jul 2019 17:24:48 +0000 (19:24 +0200)
In TYPO3\CMS\Frontend\Hooks\FrontendHooks->displayPreviewInfoMessage()
is now checked, that the config.disablePreviewNotification is set.

Resolves: #88653
Releases: master, 9.5
Change-Id: I0fc81b3aa40f46189cbb90854a401c806e5b25a2
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/61171
Tested-by: Benjamin Franzke <bfr@qbus.de>
Tested-by: TYPO3com <noreply@typo3.com>
Tested-by: Benni Mack <benni@typo3.org>
Reviewed-by: Benjamin Franzke <bfr@qbus.de>
Reviewed-by: Julian Geils <j_geils@web.de>
Reviewed-by: Benni Mack <benni@typo3.org>
typo3/sysext/frontend/Classes/Hooks/FrontendHooks.php

index 6d73781..87bf490 100644 (file)
@@ -34,7 +34,7 @@ class FrontendHooks
      */
     public function displayPreviewInfoMessage($params, TypoScriptFrontendController $controller)
     {
-        if (!$controller->fePreview || $controller->doWorkspacePreview()) {
+        if (!$controller->fePreview || $controller->doWorkspacePreview() || ($controller->config['config']['disablePreviewNotification'] ?? false)) {
             return;
         }
         if ($controller->config['config']['message_preview']) {