Skip to content

Commit

Permalink
Merge pull request #709 from bozana/10082-3_4_0
Browse files Browse the repository at this point in the history
pkp/pkp-lib#10082 consider same file IDs in getTotalGalleyViews()
  • Loading branch information
bozana authored Jun 19, 2024
2 parents 205eb2c + f558532 commit f58b9f8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion classes/submission/Submission.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
}
Expand Down

0 comments on commit f58b9f8

Please sign in to comment.