[BUGFIX] Live search shows move placeholders in draft workspace 09/13409/11
authorBart Dubelaar <bartdubelaar@gmail.com>
Wed, 1 Aug 2012 13:22:44 +0000 (15:22 +0200)
committerAlexander Opitz <opitz.alexander@googlemail.com>
Tue, 24 Nov 2015 09:25:21 +0000 (10:25 +0100)
This patch makes sure that all records that have a t3ver_move_id
other than 0 are ignored.

Resolves: #37896
Releases: master, 6.2
Change-Id: Id0b45ebdc72522f46bc9b51261eeca2e01d48db9
Reviewed-on: https://review.typo3.org/13409
Reviewed-by: Georg Ringer <georg.ringer@gmail.com>
Tested-by: Georg Ringer <georg.ringer@gmail.com>
Reviewed-by: Alexander Opitz <opitz.alexander@googlemail.com>
Tested-by: Alexander Opitz <opitz.alexander@googlemail.com>
typo3/sysext/backend/Classes/Search/LiveSearch/LiveSearch.php

index 2364aae..7ac4c61 100644 (file)
@@ -353,6 +353,7 @@ class LiveSearch
             // And the relevant conditions for deleted and versioned records
             $queryPart .= BackendUtility::deleteClause($tableName);
             $queryPart .= BackendUtility::versioningPlaceholderClause($tableName);
+            $queryPart .= BackendUtility::getWorkspaceWhereClause($tableName);
         } else {
             $queryPart = ' AND 0 = 1';
         }
@@ -467,6 +468,8 @@ class LiveSearch
             $tree->getTree($id, $depth, '');
         }
         $tree->ids[] = $id;
+        // add workspace pid - workspace permissions are taken into account by where clause later
+        $tree->ids[] = -1;
         $idList = implode(',', $tree->ids);
         return $idList;
     }