From 7638b68d52eacb5856e32bcb642ecb397167d59c Mon Sep 17 00:00:00 2001 From: ewhanson Date: Thu, 19 Oct 2023 15:10:53 -0700 Subject: [PATCH] pkp/oaiJats#35 Use publication seq for article sequence information (#37) --- OAIMetadataFormat_JATS.inc.php | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/OAIMetadataFormat_JATS.inc.php b/OAIMetadataFormat_JATS.inc.php index 243d918..3890c49 100644 --- a/OAIMetadataFormat_JATS.inc.php +++ b/OAIMetadataFormat_JATS.inc.php @@ -385,13 +385,10 @@ protected function _mungeMetadata($doc, $journal, $article, $section, $issue) { 'issueIds' => [$issue->getId()], 'status' => STATUS_PUBLISHED, ])); - $articleIds = array_map(function($publishedArticle) { - return $publishedArticle->getId(); - }, $publishedArticles); foreach (['volume', 'issue'] as $nodeName) { $match = $xpath->query("//article/front/article-meta/$nodeName"); if ($match->length) { - $match->item(0)->setAttribute('seq', array_search($article->getId(), $articleIds)+1); + $match->item(0)->setAttribute('seq', ((int) $publication->getData('seq')) + 1); break; } }