Skip to content

Commit

Permalink
pkp/pkp-lib#8700 Updated code to make use of the new safeCount() macro
Browse files Browse the repository at this point in the history
  • Loading branch information
jonasraoni committed Mar 23, 2023
1 parent deff6e7 commit 65f19ce
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
4 changes: 1 addition & 3 deletions classes/services/queryBuilders/GalleyQueryBuilder.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,7 @@ public function filterByPublicationIds($publicationIds) {
public function getCount() {
return $this
->getQuery()
->select('g.galley_id')
->get()
->count();
->safeCount();
}

/**
Expand Down
4 changes: 1 addition & 3 deletions classes/services/queryBuilders/IssueQueryBuilder.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -202,9 +202,7 @@ public function offsetBy($offset) {
public function getCount() {
return $this
->getQuery()
->select('i.issue_id')
->get()
->count();
->safeCount();
}

/**
Expand Down

0 comments on commit 65f19ce

Please sign in to comment.