Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Thomas Citharel <tcit@tcit.fr>
  • Loading branch information
CarlSchwan and tcitworld authored Feb 19, 2022
1 parent 8c39bcd commit 06d2e00
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions apps/dav/lib/CardDAV/CardDavBackend.php
Original file line number Diff line number Diff line change
Expand Up @@ -1131,13 +1131,13 @@ private function searchByAddressBookIds(array $addressBookIds,
}, $matches);

$cards = [];
foreach (array_chunk($matches, 1000) as $matche) {
foreach (array_chunk($matches, 1000) as $match) {
$query = $this->db->getQueryBuilder();
$query->select('c.addressbookid', 'c.carddata', 'c.uri')
->from($this->dbCardsTable, 'c')
->where($query->expr()->in('c.id', $query->createNamedParameter($matche, IQueryBuilder::PARAM_INT_ARRAY)));
->where($query->expr()->in('c.id', $query->createNamedParameter($match, IQueryBuilder::PARAM_INT_ARRAY)));

$result = $query->execute();
$result = $query->executeQuery();
$cards = array_merge($cards, $result->fetchAll());
$result->closeCursor();
}
Expand Down

0 comments on commit 06d2e00

Please sign in to comment.