From 066c2e761fe6ff5db87afd2157c0a87d7808d483 Mon Sep 17 00:00:00 2001 From: Kaitlin Newson Date: Thu, 29 Aug 2024 13:14:05 -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 a1a42fa07a5..f15296f8311 100644 --- a/plugins/importexport/pubmed/PubMedExportPlugin.php +++ b/plugins/importexport/pubmed/PubMedExportPlugin.php @@ -191,13 +191,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']); } } }