Skip to content

Commit

Permalink
pkp/pkp-lib#8700 Removed not needed optimizations
Browse files Browse the repository at this point in the history
  • Loading branch information
jonasraoni committed May 23, 2024
1 parent de8ac96 commit 1d30a8f
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion api/v1/issues/IssueHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ public function getMany($slimRequest, $response, $args)

return $response->withJson([
'items' => Repo::issue()->getSchemaMap()->summarizeMany($issues, $context)->values(),
'itemsMax' => $collector->limit(null)->offset(null)->getCount(),
'itemsMax' => $collector->getCount(),
], 200);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ protected function loadData($request, $filter)

$users = $userCollector->getMany();

$totalCount = $userCollector->limit(null)->offset(null)->getCount();
$totalCount = $userCollector->getCount();
return new \PKP\core\VirtualArrayIterator(iterator_to_array($users, true), $totalCount, $rangeInfo->getPage(), $rangeInfo->getCount());
}

Expand Down
2 changes: 1 addition & 1 deletion pages/issue/IssueHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ public function archive($args, $request)
->filterByPublished(true);

$issues = $collector->getMany()->toArray();
$total = $collector->limit(null)->offset(null)->getCount();
$total = $collector->getCount();

$showingStart = $offset + 1;
$showingEnd = min($offset + $count, $offset + count($issues));
Expand Down

0 comments on commit 1d30a8f

Please sign in to comment.