From 753d027db875bbfc4032bb93ea014cba20d88d69 Mon Sep 17 00:00:00 2001
From: Andreas Fernandez <a.fernandez@scripting-base.de>
Date: Tue, 30 Jun 2015 10:03:21 +0200
Subject: [PATCH] [BUGFIX] Use single quotes in query for values in
 EXT:workspaces

Use single quotes for values in the query executed in
WorkspaceService::isOldStyleWorkspaceUsed().

In ANSI SQL, single quotes have to be used for values.

Resolves: #67835
Releases: master, 6.2
Change-Id: I5bf598d9acdbc7d2db6d5b8b6f1a4c668fe13ccb
Reviewed-on: http://review.typo3.org/40748
Reviewed-by: Markus Klein <markus.klein@typo3.org>
Tested-by: Markus Klein <markus.klein@typo3.org>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: Wouter Wolters <typo3@wouterwolters.nl>
---
 typo3/sysext/workspaces/Classes/Service/WorkspaceService.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/typo3/sysext/workspaces/Classes/Service/WorkspaceService.php b/typo3/sysext/workspaces/Classes/Service/WorkspaceService.php
index f5f94f0e6cf7..a2b414ed4ab6 100644
--- a/typo3/sysext/workspaces/Classes/Service/WorkspaceService.php
+++ b/typo3/sysext/workspaces/Classes/Service/WorkspaceService.php
@@ -476,7 +476,7 @@ class WorkspaceService implements \TYPO3\CMS\Core\SingletonInterface {
 		$cacheKey = 'workspace-oldstyleworkspace-notused';
 		$cacheResult = $GLOBALS['BE_USER']->getSessionData($cacheKey);
 		if (!$cacheResult) {
-			$where = 'adminusers != "" AND adminusers NOT LIKE "%be_users%" AND adminusers NOT LIKE "%be_groups%" AND deleted=0';
+			$where = 'adminusers != \'\' AND adminusers NOT LIKE \'%be_users%\' AND adminusers NOT LIKE \'%be_groups%\' AND deleted=0';
 			$count = $GLOBALS['TYPO3_DB']->exec_SELECTcountRows('uid', 'sys_workspace', $where);
 			$oldStyleWorkspaceIsUsed = $count > 0;
 			$GLOBALS['BE_USER']->setAndSaveSessionData($cacheKey, !$oldStyleWorkspaceIsUsed);
-- 
GitLab