Skip to content

Commit

Permalink
pkp/pkp-lib#10726 consider all existing submission metadata langauges
Browse files Browse the repository at this point in the history
  • Loading branch information
bozana committed Jan 9, 2025
1 parent 4711cc5 commit 1a3f193
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 14 deletions.
4 changes: 1 addition & 3 deletions plugins/importexport/doaj/filter/DOAJXmlFilter.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down
7 changes: 2 additions & 5 deletions plugins/metadata/dc11/filter/Dc11SchemaArticleAdapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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()] ?? '';
Expand Down

0 comments on commit 1a3f193

Please sign in to comment.