Skip to content

Commit

Permalink
Merge pull request #825 from DMKEBUSINESSGMBH/master
Browse files Browse the repository at this point in the history
[BUGFIX] add more workspace criteria
  • Loading branch information
lochmueller authored Jan 16, 2025
2 parents e22e2be + 8a0f498 commit 7ac7c01
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Classes/Service/IndexPreparationService.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,12 @@ protected function addWorkspaceInformation(array &$neededItems, string $configur
{
$workspace = isset($record['t3ver_wsid']) ? (int)$record['t3ver_wsid'] : 0;
$origId = isset($record['t3ver_oid']) ? (int)$record['t3ver_oid'] : 0;
$neededItems = array_map(static function ($item) use ($workspace, $origId, $record) {
$versionState = isset($record['t3ver_state']) ? (int)$record['t3ver_state'] : 0;
$versionStage = isset($record['t3ver_stage']) ? (int)$record['t3ver_stage'] : 0;
$neededItems = array_map(static function ($item) use ($workspace, $origId, $record, $versionState, $versionStage) {
$item['t3ver_wsid'] = $workspace;
$item['t3ver_state'] = $versionState;
$item['t3ver_stage'] = $versionStage;
// Set relation to the original record
if ($workspace) {
$item['foreign_uid'] = $origId ?: (int)$record['uid'];
Expand Down

0 comments on commit 7ac7c01

Please sign in to comment.