From 27793e3512e731842d7464a9314452fc48e9efa3 Mon Sep 17 00:00:00 2001
From: Georg Ringer <georg.ringer@gmail.com>
Date: Thu, 23 Feb 2017 19:25:36 +0100
Subject: [PATCH] [BUGFIX] Use correct check in search if list module is
 available

The check if the list module is available for the user must be
extended to check for false as well.

Resolves: #79974
Releases: master, 7.6
Change-Id: Icd1e2c2cff3f37ce6763bc4f64d4011443226a68
Reviewed-on: https://review.typo3.org/51808
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Thomas Hohn <thomas@hohn.dk>
Reviewed-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
---
 Build/Resources/Public/Less/Scaffold/_toolbar.less     | 10 +++++++---
 .../Backend/ToolbarItems/LiveSearchToolbarItem.php     |  2 +-
 .../ToolbarItems/UserToolbarItemDropDown.html          |  2 +-
 typo3/sysext/backend/Resources/Public/Css/backend.css  | 10 +++++-----
 typo3/sysext/install/Resources/Public/Css/install.css  | 10 +++++-----
 5 files changed, 19 insertions(+), 15 deletions(-)

diff --git a/Build/Resources/Public/Less/Scaffold/_toolbar.less b/Build/Resources/Public/Less/Scaffold/_toolbar.less
index b9bd6cfc63d8..66e510ef5742 100644
--- a/Build/Resources/Public/Less/Scaffold/_toolbar.less
+++ b/Build/Resources/Public/Less/Scaffold/_toolbar.less
@@ -51,6 +51,13 @@
 		display: table;
 		content: '';
 	}
+
+	li:last-child {
+		@media (min-width: @scaffold-breakpoint) {
+			width: 300px;
+		}
+
+	}
 }
 
 // Toolbar Item
@@ -162,9 +169,6 @@
 
 // Search
 .toolbar-item-search {
-	@media (min-width: @scaffold-breakpoint) {
-		width: 300px;
-	}
 	form {
 		padding: 0;
 		margin: 0;
diff --git a/typo3/sysext/backend/Classes/Backend/ToolbarItems/LiveSearchToolbarItem.php b/typo3/sysext/backend/Classes/Backend/ToolbarItems/LiveSearchToolbarItem.php
index f33244f27d9b..0236af878796 100644
--- a/typo3/sysext/backend/Classes/Backend/ToolbarItems/LiveSearchToolbarItem.php
+++ b/typo3/sysext/backend/Classes/Backend/ToolbarItems/LiveSearchToolbarItem.php
@@ -55,7 +55,7 @@ class LiveSearchToolbarItem implements ToolbarItemInterface
 
         // Live search is heavily dependent on the list module and only available when that module is.
         $listModule = $backendModuleRepository->findByModuleName('web_list');
-        return $listModule !== null;
+        return $listModule !== null && $listModule !== false;
     }
 
     /**
diff --git a/typo3/sysext/backend/Resources/Private/Templates/ToolbarItems/UserToolbarItemDropDown.html b/typo3/sysext/backend/Resources/Private/Templates/ToolbarItems/UserToolbarItemDropDown.html
index ccdf8ffc57d5..c34ad0768b23 100644
--- a/typo3/sysext/backend/Resources/Private/Templates/ToolbarItems/UserToolbarItemDropDown.html
+++ b/typo3/sysext/backend/Resources/Private/Templates/ToolbarItems/UserToolbarItemDropDown.html
@@ -23,7 +23,7 @@
     </div>
     <hr>
 </f:if>
-<f:link.typolink parameter="{logoutUrl}" class="btn btn-danger pull-right" target="_top">
+<f:link.typolink parameter="{logoutUrl}" class="btn btn-danger pull-left" target="_top">
     {icon -> f:format.raw()}
     <f:if condition="{switchUserMode}">
         <f:then>
diff --git a/typo3/sysext/backend/Resources/Public/Css/backend.css b/typo3/sysext/backend/Resources/Public/Css/backend.css
index 25abc92a5159..d74644b2aa1f 100644
--- a/typo3/sysext/backend/Resources/Public/Css/backend.css
+++ b/typo3/sysext/backend/Resources/Public/Css/backend.css
@@ -7573,6 +7573,11 @@ body {
   display: table;
   content: '';
 }
+@media (min-width: 992px) {
+  .toolbar-list li:last-child {
+    width: 300px;
+  }
+}
 .toolbar-item {
   padding: 4px;
   position: relative;
@@ -7671,11 +7676,6 @@ body {
     display: none;
   }
 }
-@media (min-width: 992px) {
-  .toolbar-item-search {
-    width: 300px;
-  }
-}
 .toolbar-item-search form {
   padding: 0;
   margin: 0;
diff --git a/typo3/sysext/install/Resources/Public/Css/install.css b/typo3/sysext/install/Resources/Public/Css/install.css
index 8df8dabc110b..403093de8b23 100644
--- a/typo3/sysext/install/Resources/Public/Css/install.css
+++ b/typo3/sysext/install/Resources/Public/Css/install.css
@@ -7563,6 +7563,11 @@ body {
   display: table;
   content: '';
 }
+@media (min-width: 992px) {
+  .toolbar-list li:last-child {
+    width: 300px;
+  }
+}
 .toolbar-item {
   padding: 4px;
   position: relative;
@@ -7661,11 +7666,6 @@ body {
     display: none;
   }
 }
-@media (min-width: 992px) {
-  .toolbar-item-search {
-    width: 300px;
-  }
-}
 .toolbar-item-search form {
   padding: 0;
   margin: 0;
-- 
GitLab