Skip to content

Commit

Permalink
Merge pull request pkp#4561 from bozana/10653
Browse files Browse the repository at this point in the history
fix deprecated submission functions
  • Loading branch information
bozana authored Dec 18, 2024
2 parents be251ea + 00d315a commit 14ac13c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions plugins/generic/datacite/DatacitePlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand All @@ -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;
}
Expand Down
4 changes: 2 additions & 2 deletions plugins/generic/driver/DRIVERPlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down Expand Up @@ -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;
}
Expand Down
2 changes: 1 addition & 1 deletion templates/frontend/objects/article_summary.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@

{if !$hideGalleys}
<ul class="galleys_links">
{foreach from=$article->getGalleys() item=galley}
{foreach from=$publication->getData('galleys') item=galley}
{if $primaryGenreIds}
{assign var="file" value=$galley->getFile()}
{if !$galley->getData('urlRemote') && !($file && in_array($file->getGenreId(), $primaryGenreIds))}
Expand Down

0 comments on commit 14ac13c

Please sign in to comment.