From a20b8187e0aaaa2188c5b8e43d05a2a016353de5 Mon Sep 17 00:00:00 2001 From: Beatrycze Volk Date: Thu, 20 Jul 2023 15:15:37 +0200 Subject: [PATCH] [FEATURE] Use order in case volume_sorting is empty (#984) --- Classes/Command/BaseCommand.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Classes/Command/BaseCommand.php b/Classes/Command/BaseCommand.php index df53f70eb..aaef02736 100644 --- a/Classes/Command/BaseCommand.php +++ b/Classes/Command/BaseCommand.php @@ -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); @@ -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') {