From 1a3f1937b3bf175650a7231213ec913e6eca48f4 Mon Sep 17 00:00:00 2001 From: Bozana Bokan Date: Mon, 6 Jan 2025 14:28:31 +0100 Subject: [PATCH] pkp/pkp-lib#10726 consider all existing submission metadata langauges --- plugins/importexport/doaj/filter/DOAJXmlFilter.php | 4 +--- plugins/metadata/dc11/filter/Dc11SchemaArticleAdapter.php | 7 ++----- .../rfc1807/OAIMetadataFormat_RFC1807.php | 8 ++------ 3 files changed, 5 insertions(+), 14 deletions(-) diff --git a/plugins/importexport/doaj/filter/DOAJXmlFilter.php b/plugins/importexport/doaj/filter/DOAJXmlFilter.php index 06624a950c3..163a4033178 100644 --- a/plugins/importexport/doaj/filter/DOAJXmlFilter.php +++ b/plugins/importexport/doaj/filter/DOAJXmlFilter.php @@ -190,12 +190,10 @@ public function &process(&$pubObjects) $node->setAttribute('format', 'html'); // Keywords - $supportedLocales = $context->getSupportedFormLocales(); $articleKeywords = Repo::controlledVocab()->getBySymbolic( ControlledVocab::CONTROLLED_VOCAB_SUBMISSION_KEYWORD, Application::ASSOC_TYPE_PUBLICATION, - $publication->getId(), - $supportedLocales + $publication->getId() ); if (array_key_exists($publication->getData('locale'), $articleKeywords)) { diff --git a/plugins/metadata/dc11/filter/Dc11SchemaArticleAdapter.php b/plugins/metadata/dc11/filter/Dc11SchemaArticleAdapter.php index 442c71076e1..1889b73070d 100644 --- a/plugins/metadata/dc11/filter/Dc11SchemaArticleAdapter.php +++ b/plugins/metadata/dc11/filter/Dc11SchemaArticleAdapter.php @@ -89,19 +89,16 @@ public function &extractMetadataFromDataObject(&$article) } // Subject - $supportedLocales = $journal->getSupportedFormLocales(); $subjects = array_merge_recursive( Repo::controlledVocab()->getBySymbolic( ControlledVocab::CONTROLLED_VOCAB_SUBMISSION_KEYWORD, Application::ASSOC_TYPE_PUBLICATION, - $publication->getId(), - $supportedLocales + $publication->getId() ), Repo::controlledVocab()->getBySymbolic( ControlledVocab::CONTROLLED_VOCAB_SUBMISSION_SUBJECT, Application::ASSOC_TYPE_PUBLICATION, - $publication->getId(), - $supportedLocales + $publication->getId() ) ); $this->_addLocalizedElements($dc11Description, 'dc:subject', $subjects); diff --git a/plugins/oaiMetadataFormats/rfc1807/OAIMetadataFormat_RFC1807.php b/plugins/oaiMetadataFormats/rfc1807/OAIMetadataFormat_RFC1807.php index e90b6092470..f99f794dc0a 100644 --- a/plugins/oaiMetadataFormats/rfc1807/OAIMetadataFormat_RFC1807.php +++ b/plugins/oaiMetadataFormats/rfc1807/OAIMetadataFormat_RFC1807.php @@ -75,20 +75,16 @@ public function toXml($record, $format = null) $creators[] = $authorName; } - $supportedLocales = $journal->getSupportedFormLocales(); - $subjects = array_merge_recursive( Repo::controlledVocab()->getBySymbolic( ControlledVocab::CONTROLLED_VOCAB_SUBMISSION_KEYWORD, Application::ASSOC_TYPE_PUBLICATION, - $publication->getId(), - $supportedLocales + $publication->getId() ), Repo::controlledVocab()->getBySymbolic( ControlledVocab::CONTROLLED_VOCAB_SUBMISSION_SUBJECT, Application::ASSOC_TYPE_PUBLICATION, - $article->getCurrentPublication()->getId(), - $supportedLocales + $article->getCurrentPublication()->getId() ) ); $subject = $subjects[$journal->getPrimaryLocale()] ?? '';