From f5585329ae58b012959178ad8371bfadfc487ff7 Mon Sep 17 00:00:00 2001 From: Bozana Bokan Date: Tue, 18 Jun 2024 16:27:01 +0200 Subject: [PATCH] pkp/pkp-lib#10082 consider same file IDs in getTotalGalleyViews() --- classes/submission/Submission.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/classes/submission/Submission.php b/classes/submission/Submission.php index 242b769840..443ce2c342 100644 --- a/classes/submission/Submission.php +++ b/classes/submission/Submission.php @@ -228,7 +228,7 @@ public function getTotalGalleyViews() foreach ($publications as $publication) { foreach ($publication->getData('galleys') as $galley) { $file = $galley->getFile(); - if (!$galley->getRemoteUrl() && $file) { + if (!$galley->getRemoteUrl() && $file && !in_array($file->getId(), $fileIds)) { $fileIds[] = $file->getId(); } }