Skip to content

Commit

Permalink
Merge pull request #42152 from nextcloud/backport/42144/stable28
Browse files Browse the repository at this point in the history
[stable28] fix(caldav): don't reuse query builder objects
  • Loading branch information
nickvergessen authored Dec 15, 2023
2 parents 8942746 + 043a252 commit 261de22
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions apps/dav/lib/CalDAV/CalDavBackend.php
Original file line number Diff line number Diff line change
Expand Up @@ -3092,11 +3092,13 @@ public function purgeAllCachedEventsForSubscription($subscriptionId) {
->andWhere($query->expr()->eq('calendartype', $query->createNamedParameter(self::CALENDAR_TYPE_SUBSCRIPTION)))
->executeStatement();

$query = $this->db->getQueryBuilder();
$query->delete('calendarchanges')
->where($query->expr()->eq('calendarid', $query->createNamedParameter($subscriptionId)))
->andWhere($query->expr()->eq('calendartype', $query->createNamedParameter(self::CALENDAR_TYPE_SUBSCRIPTION)))
->executeStatement();

$query = $this->db->getQueryBuilder();
$query->delete($this->dbObjectPropertiesTable)
->where($query->expr()->eq('calendarid', $query->createNamedParameter($subscriptionId)))
->andWhere($query->expr()->eq('calendartype', $query->createNamedParameter(self::CALENDAR_TYPE_SUBSCRIPTION)))
Expand Down

0 comments on commit 261de22

Please sign in to comment.