Skip to content
This repository has been archived by the owner on Aug 13, 2022. It is now read-only.

Commit

Permalink
fixed content translation handling during upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
Guite committed Sep 23, 2018
1 parent 70e4a23 commit c8d8632
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/modules/Zikula/ContentModule/ContentModuleInstaller.php
Expand Up @@ -289,12 +289,13 @@ public function upgrade($oldVersion)
WHERE `transc_cid` = " . intval($oldContentItemId) . "
");
while ($transRow = $transStmt->fetch()) {
$contentData = @unserialize($row['transc_data']);
$contentData = @unserialize($transRow['transc_data']);
if ($contentData) {
$contentData = array_merge($item->getContentData(), $contentData);
$contentData = $contentData + $item->getContentData();
$item->setContentData($contentData);
$contentType = $contentDisplayHelper->initContentType($item);
$item->setSearchText($contentType->getSearchableText());
}

$item->setLocale($transRow['transc_lang']);
$this->entityManager->flush($item);
}
Expand Down

0 comments on commit c8d8632

Please sign in to comment.