From 9a94b6a39bb5e868039c66b7339c2c8072ad3c20 Mon Sep 17 00:00:00 2001 From: Richard Steinmetz Date: Sat, 23 Nov 2024 16:41:59 +0100 Subject: [PATCH 1/2] fix: invalid usage of IQueryBuilder::createNamedParameter() And fix a typo: chunck -> chunk Signed-off-by: Richard Steinmetz --- apps/dav/lib/CalDAV/CalDavBackend.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/dav/lib/CalDAV/CalDavBackend.php b/apps/dav/lib/CalDAV/CalDavBackend.php index 7bef0becfc472..5f7c4d6fc07ad 100644 --- a/apps/dav/lib/CalDAV/CalDavBackend.php +++ b/apps/dav/lib/CalDAV/CalDavBackend.php @@ -3529,9 +3529,9 @@ protected function purgeCalendarInvitations(int $calendarId): void { // delete all links that match object uid's $cmd = $this->db->getQueryBuilder(); $cmd->delete($this->dbObjectInvitationsTable) - ->where($cmd->expr()->in('uid', $cmd->createNamedParameter('uids'), IQueryBuilder::PARAM_STR_ARRAY)); - foreach (array_chunk($allIds, 1000) as $chunckIds) { - $cmd->setParameter('uids', $chunckIds, IQueryBuilder::PARAM_INT_ARRAY); + ->where($cmd->expr()->in('uid', $cmd->createParameter('uids'), IQueryBuilder::PARAM_STR_ARRAY)); + foreach (array_chunk($allIds, 1000) as $chunkIds) { + $cmd->setParameter('uids', $chunkIds, IQueryBuilder::PARAM_INT_ARRAY); $cmd->executeStatement(); } } From 2a1177a2756b5338bd51bedc086ddb1b6fc1de9d Mon Sep 17 00:00:00 2001 From: Richard Steinmetz Date: Sat, 23 Nov 2024 16:52:46 +0100 Subject: [PATCH 2/2] fix: improve oci compatibility when purging calendar invitations Signed-off-by: Richard Steinmetz --- apps/dav/lib/CalDAV/CalDavBackend.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/dav/lib/CalDAV/CalDavBackend.php b/apps/dav/lib/CalDAV/CalDavBackend.php index 5f7c4d6fc07ad..6268693649ca3 100644 --- a/apps/dav/lib/CalDAV/CalDavBackend.php +++ b/apps/dav/lib/CalDAV/CalDavBackend.php @@ -3531,7 +3531,7 @@ protected function purgeCalendarInvitations(int $calendarId): void { $cmd->delete($this->dbObjectInvitationsTable) ->where($cmd->expr()->in('uid', $cmd->createParameter('uids'), IQueryBuilder::PARAM_STR_ARRAY)); foreach (array_chunk($allIds, 1000) as $chunkIds) { - $cmd->setParameter('uids', $chunkIds, IQueryBuilder::PARAM_INT_ARRAY); + $cmd->setParameter('uids', $chunkIds, IQueryBuilder::PARAM_STR_ARRAY); $cmd->executeStatement(); } } @@ -3548,7 +3548,7 @@ protected function purgeCalendarInvitations(int $calendarId): void { protected function purgeObjectInvitations(string $eventId): void { $cmd = $this->db->getQueryBuilder(); $cmd->delete($this->dbObjectInvitationsTable) - ->where($cmd->expr()->eq('uid', $cmd->createNamedParameter($eventId))); + ->where($cmd->expr()->eq('uid', $cmd->createNamedParameter($eventId, IQueryBuilder::PARAM_STR), IQueryBuilder::PARAM_STR)); $cmd->executeStatement(); } }