[BUGFIX] Use single quotes in query for values in EXT:workspaces 48/40748/4
authorAndreas Fernandez <a.fernandez@scripting-base.de>
Tue, 30 Jun 2015 08:03:21 +0000 (10:03 +0200)
committerWouter Wolters <typo3@wouterwolters.nl>
Wed, 1 Jul 2015 10:14:59 +0000 (12:14 +0200)
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

index f5f94f0..a2b414e 100644 (file)
@@ -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);