Skip to content

Commit

Permalink
fix: échappement de caractères spéciaux dans abstract de config WMTS-…
Browse files Browse the repository at this point in the history
…TMS IGNGPF-3673
  • Loading branch information
ocruze committed Aug 21, 2024
1 parent 37bbb63 commit 7814be7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/Controller/Entrepot/PyramidController.php
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ private function getConfigRequestBody(PublishPyramidDTO $dto, array $pyramid, bo
'name' => $dto->public_name,
'type_infos' => [
'title' => $dto->public_name,
'abstract' => '.', // json_encode($dto->description), // TODO temporairement description vide, parce que les caractères spéciaux font planter le endpoint tms
'abstract' => json_encode($dto->description),
'keywords' => $dto->category,
'used_data' => [[
'bottom_level' => $levels['bottom_level'],
Expand Down
10 changes: 5 additions & 5 deletions src/Services/EntrepotApi/CartesMetadataApiService.php
Original file line number Diff line number Diff line change
Expand Up @@ -246,14 +246,14 @@ private function getNewCswMetadata(string $datastoreId, string $datasheetName, ?
$newCswMetadata->title = $formData['public_name'];
$newCswMetadata->abstract = $formData['description'];
$newCswMetadata->creationDate = $formData['creation_date'];
$newCswMetadata->topicCategories = $formData['category'];
$newCswMetadata->inspireKeywords = $formData['keywords'];
$newCswMetadata->freeKeywords = $formData['free_keywords'];
$newCswMetadata->topicCategories = $formData['category'] ?? [];
$newCswMetadata->inspireKeywords = $formData['keywords'] ?? [];
$newCswMetadata->freeKeywords = $formData['free_keywords'] ?? [];
$newCswMetadata->contactEmail = $formData['email_contact'];
$newCswMetadata->organisationName = $formData['organization'];
$newCswMetadata->organisationEmail = $formData['organization_email'];
$newCswMetadata->resolution = $formData['resolution'];
$newCswMetadata->frequencyCode = $formData['frequency_code'];
$newCswMetadata->resolution = $formData['resolution'] ?? null;
$newCswMetadata->frequencyCode = $formData['frequency_code'] ?? null;
$newCswMetadata->layers = $layers;
$newCswMetadata->styleFiles = $this->getStyleFiles($datastoreId, $datasheetName);

Expand Down

0 comments on commit 7814be7

Please sign in to comment.