diff options
author | Joas Schilling <coding@schilljs.com> | 2023-02-01 21:49:34 +0100 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2023-02-01 21:49:34 +0100 |
commit | 1a31ddb56d8b58440e23d4e38dbee18267de26ce (patch) | |
tree | e4fc607fc7ed3bcbe925e19553253cbc7fb5b028 /apps/dav | |
parent | 41148acf833d401aa6c8bd23617ae8639b6aaae6 (diff) | |
download | nextcloud-server-1a31ddb56d8b58440e23d4e38dbee18267de26ce.tar.gz nextcloud-server-1a31ddb56d8b58440e23d4e38dbee18267de26ce.zip |
Do not reuse query builder objects in DAV account deletion
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'apps/dav')
-rw-r--r-- | apps/dav/lib/CalDAV/CalDavBackend.php | 4 | ||||
-rw-r--r-- | apps/dav/lib/CardDAV/CardDavBackend.php | 3 |
2 files changed, 5 insertions, 2 deletions
diff --git a/apps/dav/lib/CalDAV/CalDavBackend.php b/apps/dav/lib/CalDAV/CalDavBackend.php index a894b65d756..909a5828059 100644 --- a/apps/dav/lib/CalDAV/CalDavBackend.php +++ b/apps/dav/lib/CalDAV/CalDavBackend.php @@ -897,7 +897,7 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription ->executeStatement(); $qbDeleteCalendarChanges = $this->db->getQueryBuilder(); - $qbDeleteCalendarObjects->delete('calendarchanges') + $qbDeleteCalendarChanges->delete('calendarchanges') ->where($qbDeleteCalendarChanges->expr()->eq('calendarid', $qbDeleteCalendarChanges->createNamedParameter($calendarId))) ->andWhere($qbDeleteCalendarChanges->expr()->eq('calendartype', $qbDeleteCalendarChanges->createNamedParameter(self::CALENDAR_TYPE_CALENDAR))) ->executeStatement(); @@ -905,7 +905,7 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription $this->calendarSharingBackend->deleteAllShares($calendarId); $qbDeleteCalendar = $this->db->getQueryBuilder(); - $qbDeleteCalendarObjects->delete('calendars') + $qbDeleteCalendar->delete('calendars') ->where($qbDeleteCalendar->expr()->eq('id', $qbDeleteCalendar->createNamedParameter($calendarId))) ->executeStatement(); diff --git a/apps/dav/lib/CardDAV/CardDavBackend.php b/apps/dav/lib/CardDAV/CardDavBackend.php index 03ddb93c084..ab21af1ce10 100644 --- a/apps/dav/lib/CardDAV/CardDavBackend.php +++ b/apps/dav/lib/CardDAV/CardDavBackend.php @@ -452,11 +452,13 @@ class CardDavBackend implements BackendInterface, SyncSupport { ->setParameter('addressbookid', $addressBookId, IQueryBuilder::PARAM_INT) ->executeStatement(); + $query = $this->db->getQueryBuilder(); $query->delete('addressbookchanges') ->where($query->expr()->eq('addressbookid', $query->createParameter('addressbookid'))) ->setParameter('addressbookid', $addressBookId, IQueryBuilder::PARAM_INT) ->executeStatement(); + $query = $this->db->getQueryBuilder(); $query->delete('addressbooks') ->where($query->expr()->eq('id', $query->createParameter('id'))) ->setParameter('id', $addressBookId, IQueryBuilder::PARAM_INT) @@ -464,6 +466,7 @@ class CardDavBackend implements BackendInterface, SyncSupport { $this->sharingBackend->deleteAllShares($addressBookId); + $query = $this->db->getQueryBuilder(); $query->delete($this->dbCardsPropertiesTable) ->where($query->expr()->eq('addressbookid', $query->createNamedParameter($addressBookId, IQueryBuilder::PARAM_INT))) ->executeStatement(); |