aboutsummaryrefslogtreecommitdiffstats
path: root/apps/dav/lib/CardDAV
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2023-02-01 21:49:34 +0100
committerJoas Schilling <coding@schilljs.com>2023-02-01 21:49:34 +0100
commit1a31ddb56d8b58440e23d4e38dbee18267de26ce (patch)
treee4fc607fc7ed3bcbe925e19553253cbc7fb5b028 /apps/dav/lib/CardDAV
parent41148acf833d401aa6c8bd23617ae8639b6aaae6 (diff)
downloadnextcloud-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/lib/CardDAV')
-rw-r--r--apps/dav/lib/CardDAV/CardDavBackend.php3
1 files changed, 3 insertions, 0 deletions
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();