Skip to content

Commit

Permalink
Merge pull request #42144 from nextcloud/fix/dont-reuse-query-builder…
Browse files Browse the repository at this point in the history
…-caldav

fix(caldav): don't reuse query builder objects
  • Loading branch information
miaulalala authored Dec 11, 2023
2 parents 1f10b28 + 3475d52 commit 9e10b1d
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 9e10b1d

Please sign in to comment.