Skip to content

Commit

Permalink
[BUGFIX] Fix upgrade wizard cruserId uses in different Version
Browse files Browse the repository at this point in the history
  • Loading branch information
NarkNiro committed May 3, 2024
1 parent 00e2586 commit 4ab6cfd
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions Classes/Upgrades/GlossaryUpgradeWizard.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,11 @@ public function executeUpdate(): bool

$updateGlossary = [];
foreach ($result as $item) {
$updateGlossary[] = [
$formatItem = [
'uid' => $item['uid'],
'pid' => $item['pid'],
'tstamp' => $item['tstamp'],
'crdate' => $item['crdate'],
'cruser_id' => $item['cruser_id'],
'deleted' => $item['deleted'],
'hidden' => $item['hidden'],
'sys_language_uid' => $item['sys_language_uid'],
Expand All @@ -81,6 +80,12 @@ public function executeUpdate(): bool
'l10n_diffsource' => $item['l10n_diffsource'],
'term' => $item['term'],
];

if ((new Typo3Version())->getMajorVersion() < 12) {
$formatItem['cruser_id'] = $item['cruser_id'];
}

$updateGlossary[] = $formatItem;
}

$insert = GeneralUtility::makeInstance(ConnectionPool::class)
Expand Down

0 comments on commit 4ab6cfd

Please sign in to comment.