Skip to content

Commit

Permalink
Merge branch 'mg-remove-author-new-lines' into test-mg-frontend
Browse files Browse the repository at this point in the history
  • Loading branch information
rastislav-chynoransky committed Jan 22, 2024
2 parents 38b494d + ba25e20 commit b77c7df
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
1 change: 0 additions & 1 deletion app/Importers/MgFotoImporter.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ class MgFotoImporter extends AbstractImporter
'date_earliest' => 'RokVzOd',
'date_latest' => 'RokVzDo',
'acquisition_date' => 'RokAkv',
'author' => 'Autor',
'dating:sk' => 'DatVz',
'dating:cs' => 'DatVz',
'description:sk' => 'Popis',
Expand Down
1 change: 0 additions & 1 deletion app/Importers/MgImporter.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ class MgImporter extends AbstractImporter
'date_earliest' => 'RokOd',
'date_latest' => 'Do',
'acquisition_date' => 'RokAkv',
'author' => 'Autor',
'dating:sk' => 'Datace',
'dating:cs' => 'Datace',
'place:sk' => 'MístoVz',
Expand Down
5 changes: 5 additions & 0 deletions app/Importers/MgImporterTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,11 @@ protected function getItemImageFilenameFormat(array $record): string
return sprintf('%s(_.*)?', preg_quote($filename));
}

protected function hydrateAuthor(array $record): string
{
return str($record['Autor'])->swap([PHP_EOL => ' ']);
}

protected function hydrateIdentifier(array $record): string
{
$identifier = sprintf('%s %s', $record['Rada_S'], (int) $record['PorC_S']);
Expand Down

0 comments on commit b77c7df

Please sign in to comment.