Skip to content

Commit

Permalink
fix save load fallback translation
Browse files Browse the repository at this point in the history
  • Loading branch information
gebi84 committed Apr 20, 2022
1 parent 5beb6e7 commit 054523e
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/EventListener/LoadFallbackTranslationsListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,7 @@ public function loadFallbackTranslation(DataContainer $dc)

if ($save) {
if ($mode === 'insert') {
$activeLangModel->setRow($params);
$activeLangModel->save();
Database::getInstance()->prepare('INSERT INTO ' . $dc->table . ' %s')->set($params)->execute();
} else {
Database::getInstance()->prepare('UPDATE ' . $dc->table . ' %s WHERE id = ? LIMIT 1')->set($params)->execute((int) $activeLangModel->id);
}
Expand Down

0 comments on commit 054523e

Please sign in to comment.