[BUGFIX] Use single quotes in query for values in EXT:workspaces 89/40789/2
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:15:45 +0000 (12:15 +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/40789
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: Wouter Wolters <typo3@wouterwolters.nl>
typo3/sysext/workspaces/Classes/Service/WorkspaceService.php

index 79051b4..68f1926 100644 (file)
@@ -475,7 +475,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);