Skip to content

Commit

Permalink
pkp/pkp-lib#10082 consider same file IDs in getTotalGalleyViews()
Browse files Browse the repository at this point in the history
  • Loading branch information
bozana committed Jun 18, 2024
1 parent 52085fb commit f558532
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 f558532

Please sign in to comment.