Skip to content

Commit

Permalink
[FEATURE] Use order in case volume_sorting is empty (#984)
Browse files Browse the repository at this point in the history
  • Loading branch information
beatrycze-volk authored and sebastian-meyer committed Sep 15, 2023
1 parent 0d590cc commit a20b818
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Classes/Command/BaseCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ protected function saveToDatabase(Document $document)
$document->setAuthor(implode('; ', $metadata['author']));
$document->setThumbnail($doc->thumbnail ? : '');
$document->setMetsLabel($metadata['mets_label'][0] ? : '');
$document->setMetsOrderlabel($metadata['mets_orderlabel'][0] ? : $metadata['mets_order'][0] ? : '');
$document->setMetsOrderlabel($metadata['mets_orderlabel'][0] ? : '');

$structure = $this->structureRepository->findOneByIndexName($metadata['type'][0], 'tx_dlf_structures');
$document->setStructure($structure);
Expand Down Expand Up @@ -272,7 +272,7 @@ protected function saveToDatabase(Document $document)

// set volume data
$document->setVolume($metadata['volume'][0] ? : '');
$document->setVolumeSorting($metadata['volume_sorting'][0] ? : '');
$document->setVolumeSorting($metadata['volume_sorting'][0] ? : $metadata['mets_order'][0] ? : '');

// Get UID of parent document.
if ($document->getDocumentFormat() === 'METS') {
Expand Down

0 comments on commit a20b818

Please sign in to comment.