From 00d315a20abad5553ced56867333f2e75f7e18d7 Mon Sep 17 00:00:00 2001 From: Bozana Bokan Date: Mon, 16 Dec 2024 20:12:04 +0100 Subject: [PATCH] fix deprecated submission functions --- plugins/generic/datacite/DatacitePlugin.php | 4 ++-- plugins/generic/driver/DRIVERPlugin.php | 4 ++-- templates/frontend/objects/article_summary.tpl | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/plugins/generic/datacite/DatacitePlugin.php b/plugins/generic/datacite/DatacitePlugin.php index c348bce6054..feb3d156173 100644 --- a/plugins/generic/datacite/DatacitePlugin.php +++ b/plugins/generic/datacite/DatacitePlugin.php @@ -107,7 +107,7 @@ public function exportSubmissions(array $submissions, Context $context): array foreach ($submissions as $submission) { $items[] = $submission; if (in_array(Repo::doi()::TYPE_REPRESENTATION, $context->getEnabledDoiTypes())) { - foreach ($submission->getGalleys() as $galley) { + foreach ($submission->getCurrentPublication()->getData('galleys') as $galley) { if ($galley->getDoi()) { $items[] = $galley; } @@ -132,7 +132,7 @@ public function depositSubmissions(array $submissions, Context $context): array foreach ($submissions as $submission) { $items[] = $submission; if (in_array(Repo::doi()::TYPE_REPRESENTATION, $context->getEnabledDoiTypes())) { - foreach ($submission->getGalleys() as $galley) { + foreach ($submission->getCurrentPublication()->getData('galleys') as $galley) { if ($galley->getDoi()) { $items[] = $galley; } diff --git a/plugins/generic/driver/DRIVERPlugin.php b/plugins/generic/driver/DRIVERPlugin.php index fb2f0400750..57d2ce23f01 100644 --- a/plugins/generic/driver/DRIVERPlugin.php +++ b/plugins/generic/driver/DRIVERPlugin.php @@ -181,7 +181,7 @@ public function isDRIVERRecord($row) } // is there a full text - $galleys = $submission->getGalleys(); + $galleys = $publication->getData('galleys'); if (!empty($galleys)) { return $status == DRIVER_ACCESS_OPEN; } @@ -233,7 +233,7 @@ public function isDRIVERArticle($journalId, $articleId) } // is there a full text - $galleys = $submission->getGalleys(); + $galleys = $publication->getData('galleys'); if (!empty($galleys)) { return $status == DRIVER_ACCESS_OPEN; } diff --git a/templates/frontend/objects/article_summary.tpl b/templates/frontend/objects/article_summary.tpl index e9ed0fe62ca..4730bada000 100644 --- a/templates/frontend/objects/article_summary.tpl +++ b/templates/frontend/objects/article_summary.tpl @@ -85,7 +85,7 @@ {if !$hideGalleys}