[BUGFIX] Fix wrong query in DataHandlerHook 27/49727/2
authorWouter Wolters <typo3@wouterwolters.nl>
Thu, 1 Sep 2016 14:03:41 +0000 (16:03 +0200)
committerMorton Jonuschat <m.jonuschat@mojocode.de>
Fri, 2 Sep 2016 08:06:37 +0000 (10:06 +0200)
Due to #76259 a wrong query is executed in the DataHandlerHook.
Pass the right parameters in the BackendWorkspaceRestriction
initialization.

Resolves: #77758
Releases: master
Change-Id: I564e0af6dd6c53306096865c959f2fda315584f9
Reviewed-on: https://review.typo3.org/49727
Tested-by: Bamboo TYPO3com <info@typo3.com>
Reviewed-by: Daniel Goerz <ervaude@gmail.com>
Tested-by: Daniel Goerz <ervaude@gmail.com>
Reviewed-by: Morton Jonuschat <m.jonuschat@mojocode.de>
Tested-by: Morton Jonuschat <m.jonuschat@mojocode.de>
typo3/sysext/workspaces/Classes/Hook/DataHandlerHook.php

index 63881af..e8895ef 100644 (file)
@@ -105,7 +105,7 @@ class DataHandlerHook
                 $queryBuilder->getRestrictions()
                     ->removeAll()
                     ->add(GeneralUtility::makeInstance(DeletedRestriction::class))
                 $queryBuilder->getRestrictions()
                     ->removeAll()
                     ->add(GeneralUtility::makeInstance(DeletedRestriction::class))
-                    ->add(GeneralUtility::makeInstance(BackendWorkspaceRestriction::class));
+                    ->add(GeneralUtility::makeInstance(BackendWorkspaceRestriction::class, $workspaceId, false));
 
                 $result = $queryBuilder
                     ->select('uid')
 
                 $result = $queryBuilder
                     ->select('uid')