From 389405c51df79a6795f26597809a43ab8b17e19f Mon Sep 17 00:00:00 2001 From: Kaitlin Newson Date: Thu, 29 Aug 2024 13:15:53 -0300 Subject: [PATCH] pkp/pkp-lib#8564 order export by issue ordering in pubmed plugin --- plugins/importexport/pubmed/PubMedExportPlugin.php | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/plugins/importexport/pubmed/PubMedExportPlugin.php b/plugins/importexport/pubmed/PubMedExportPlugin.php index a85a64eb70e..e2ada1bddd2 100644 --- a/plugins/importexport/pubmed/PubMedExportPlugin.php +++ b/plugins/importexport/pubmed/PubMedExportPlugin.php @@ -195,13 +195,11 @@ public function exportIssues($issueIds, $context, $user) foreach ($issueIds as $issueId) { $sections = Repo::section()->getByIssueId($issueId); + $submissionsInSections = []; + $submissionsInSections[] = Repo::submission()->getInSections($issueId, $context->getId()); foreach ($sections as $section) { - $submissionsInSections = []; - $submissionsInSections[] = Repo::submission()->getInSections($issueId, $context->getId()); foreach ($submissionsInSections as $articles) { - foreach ($articles[$section->getId()]['articles'] as $article) { - $input[] = $article; - } + $input = array_merge($input, $articles[$section->getId()]['articles']); } } }