[BUGFIX] Correct doctrine expression for perms_clause 25/52825/3
authorGerrit Mohrmann <mohrmann.t3@gmx.de>
Wed, 17 May 2017 12:41:23 +0000 (14:41 +0200)
committerJigal van Hemert <jigal.van.hemert@typo3.org>
Wed, 17 May 2017 21:14:32 +0000 (23:14 +0200)
During the refactoring to doctrine in https://review.typo3.org/#/c/48574
a wrong expression was used. Use notIn() instead of in().

Resolves: #81246
Releases: master, 8.7
Change-Id: Icd1bf595fe3a75dc12d875a8a4c416c9b568c6c0
Reviewed-on: https://review.typo3.org/52825
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Reviewed-by: Andreas Fernandez <typo3@scripting-base.de>
Tested-by: Andreas Fernandez <typo3@scripting-base.de>
Reviewed-by: Jan Helke <typo3@helke.de>
Tested-by: Jan Helke <typo3@helke.de>
Reviewed-by: Jigal van Hemert <jigal.van.hemert@typo3.org>
Tested-by: Jigal van Hemert <jigal.van.hemert@typo3.org>
typo3/sysext/backend/Classes/Controller/NewRecordController.php

index e56288c..2bcd001 100644 (file)
@@ -170,7 +170,7 @@ class NewRecordController extends AbstractModule
             if (!empty($pidList)) {
                 $queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)
                     ->getQueryBuilderForTable('pages');
-                $this->perms_clause .= ' AND ' . $queryBuilder->expr()->in(
+                $this->perms_clause .= ' AND ' . $queryBuilder->expr()->notIn(
                     'pages.uid',
                     GeneralUtility::intExplode(',', $pidList)
                 );