Skip to content

Commit

Permalink
pkp/pkp-lib#9468 fix Needs DOI filter
Browse files Browse the repository at this point in the history
  • Loading branch information
bozana committed Aug 16, 2024
1 parent 26190c9 commit c244438
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions classes/submission/Collector.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ protected function addHasDoisFilterToQuery(Builder $q)
$q->select('current_p.publication_id')
->from('publications', 'current_p')
->leftJoin('submission_chapters as current_c', 'current_p.publication_id', '=', 'current_c.publication_id')
->leftJoin('submission_chapter_settings as current_cs', 'current_cs.chapter_id', '=', 'current_c.chapter_id')
->leftJoin('publication_formats as current_pf', 'current_p.publication_id', '=', 'current_pf.publication_id')
->where(function (Builder $q) {
$q->when($this->hasDois === true, function (Builder $q) {
Expand All @@ -109,6 +110,10 @@ protected function addHasDoisFilterToQuery(Builder $q)
$q->orWhere(function (Builder $q) {
$q->whereNull('current_c.doi_id');
$q->whereNotNull('current_c.chapter_id');
$q->where(function (Builder $q) {
$q->where('current_cs.setting_name', '=', 'isPageEnabled');
$q->where('current_cs.setting_value', '=', 1);
});
});
});
$q->when(in_array(Repo::doi()::TYPE_REPRESENTATION, $this->enabledDoiTypes), function (Builder $q) {
Expand Down

0 comments on commit c244438

Please sign in to comment.