Skip to content

Commit

Permalink
fix clone bug
Browse files Browse the repository at this point in the history
  • Loading branch information
joachimdoerr committed Jul 21, 2023
1 parent e4e722f commit e4a813c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Cke5/Utils/Cke5ListHelper.php
Expand Up @@ -60,7 +60,7 @@ static public function cloneData(string $table, int $id): string
}
}
}
$sql->setQuery('INSERT INTO ' . $sql->escapeIdentifier($table) . ' (`:query_fields`) SELECT `:query_fields` FROM :table WHERE id =:id', ['query_fields' => implode('`, `', $queryFields), 'id' => $id]);
$sql->setQuery('INSERT INTO ' . $sql->escapeIdentifier($table) . ' (`'.implode('`, `', $queryFields).'`) SELECT `'.implode('`, `', $queryFields).'` FROM ' . $sql->escapeIdentifier($table) . ' WHERE id =:id', ['id' => $id]);
} catch (rex_sql_exception $e) {
rex_logger::logException($e);
return rex_view::error(rex_i18n::msg($table . '_clone_exception'));
Expand Down

0 comments on commit e4a813c

Please sign in to comment.