From a09ceda3e9a6a30dac928e7e429d4cc8f83d410c Mon Sep 17 00:00:00 2001 From: Taslan Graham Date: Tue, 17 Dec 2024 17:17:54 -0500 Subject: [PATCH] pkp/pkp-lib#10178 Allow search by DOI in DOI manager --- classes/submission/Collector.php | 19 +++++++++++++++++++ lib/pkp | 2 +- 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/classes/submission/Collector.php b/classes/submission/Collector.php index 48c799229e..549c2e0935 100644 --- a/classes/submission/Collector.php +++ b/classes/submission/Collector.php @@ -1,4 +1,5 @@ whereIn('s.submission_id', function (Builder $query) { + $query->select('p.submission_id') + ->from('publication_galleys AS g') + ->join('dois AS d', 'g.doi_id', '=', 'd.doi_id') + ->join('publications AS p', 'g.publication_id', '=', 'p.publication_id') + ->whereLike('d.doi', "{$this->searchPhrase}%") + ->union(function (Builder $query) { + $query->select('p.submission_id') + ->from('publications AS p') + ->join('dois AS d', 'p.doi_id', '=', 'd.doi_id') + ->whereLike('d.doi', "{$this->searchPhrase}%"); + }); + }); + } } diff --git a/lib/pkp b/lib/pkp index d05f1af72f..ac62765e6a 160000 --- a/lib/pkp +++ b/lib/pkp @@ -1 +1 @@ -Subproject commit d05f1af72f322c6b3ff241f8185292ca71990f35 +Subproject commit ac62765e6aef146f46f12da6c6b29612cc901889