Skip to content

Commit 63ac8aa

Browse files
committed
Deposit chapter DOIs only, if chapter has an own landing page
1 parent e9ac332 commit 63ac8aa

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

DatacitePlugin.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,9 @@ public function exportSubmissions(array $submissions, Context $context): array
118118
/** @var Chapter $chapter */
119119
foreach ($chapters as $chapter) {
120120
if ($chapter->getDoi()) {
121-
$items[] = $chapter;
121+
if ($chapter->isPageEnabled() === 1) { //TODO: Remove this control structure, if omp core only assigns DOIs to chapters with own landing page.
122+
$items[] = $chapter;
123+
}
122124
}
123125
}
124126
}
@@ -165,7 +167,9 @@ public function depositSubmissions(array $submissions, Context $context): array
165167
/** @var Chapter $chapter */
166168
foreach ($chapters as $chapter) {
167169
if ($chapter->getDoi()) {
168-
$items[] = $chapter;
170+
if ($chapter->isPageEnabled() === 1) { //TODO: Remove this control structure, if omp core only assigns DOIs to chapters with own landing page.
171+
$items[] = $chapter;
172+
}
169173
}
170174
}
171175
}

0 commit comments

Comments
 (0)