From b2d4000961c5b86c41a82f3c6807b79052a3862f Mon Sep 17 00:00:00 2001 From: Jonas Raoni Soares da Silva Date: Fri, 7 Apr 2023 14:49:30 +0300 Subject: [PATCH 1/3] pkp/pkp-lib#8700 Updated code to make use of the new safeCount() macro --- classes/doi/Repository.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/classes/doi/Repository.php b/classes/doi/Repository.php index 932842e0003..706fc029993 100644 --- a/classes/doi/Repository.php +++ b/classes/doi/Repository.php @@ -260,8 +260,8 @@ public function isAssigned(int $doiId, string $pubObjectType): bool return Repo::submissionFile() ->getCollector() - ->getIds() - ->count(); + ->getQueryBuilder() + ->safeCount(); }; $isAssigned = match ($pubObjectType) { From f29a6e458c90076b0404a90402fde7520372ca13 Mon Sep 17 00:00:00 2001 From: Jonas Raoni Soares da Silva Date: Thu, 23 May 2024 23:39:17 +0300 Subject: [PATCH 2/3] pkp/pkp-lib#8700 Dropped safeCount() workaround in favor of getCountForPagination() --- classes/doi/Repository.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/classes/doi/Repository.php b/classes/doi/Repository.php index 706fc029993..1231424d211 100644 --- a/classes/doi/Repository.php +++ b/classes/doi/Repository.php @@ -261,7 +261,7 @@ public function isAssigned(int $doiId, string $pubObjectType): bool return Repo::submissionFile() ->getCollector() ->getQueryBuilder() - ->safeCount(); + ->getCountForPagination(); }; $isAssigned = match ($pubObjectType) { From c476a95963e2b3d434a65bc9b5da05546a53c58e Mon Sep 17 00:00:00 2001 From: Jonas Raoni Soares da Silva Date: Fri, 7 Apr 2023 15:18:28 +0300 Subject: [PATCH 3/3] pkp/pkp-lib#8700 Submodule update ##jonasraoni/feature-stable-3_4_0-8700-improve-slow-query## --- lib/pkp | 2 +- plugins/generic/webFeed | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/pkp b/lib/pkp index 1f78b8f3530..d9c1a6f7b72 160000 --- a/lib/pkp +++ b/lib/pkp @@ -1 +1 @@ -Subproject commit 1f78b8f3530869be44ceb4aec77239e375548b18 +Subproject commit d9c1a6f7b726d88310b486d5a22ce6b501c10a49 diff --git a/plugins/generic/webFeed b/plugins/generic/webFeed index fb382b05c46..6c91be5860b 160000 --- a/plugins/generic/webFeed +++ b/plugins/generic/webFeed @@ -1 +1 @@ -Subproject commit fb382b05c460acdece9825253dfd275e8d768e14 +Subproject commit 6c91be5860b77c837c0ddf1ec0c70f61e4ebb947