From a1681b0756ef784ef7056a3aae3e569a6dcae00e Mon Sep 17 00:00:00 2001 From: Git'Fellow <12234510+solracsf@users.noreply.github.com> Date: Thu, 17 Oct 2024 15:42:21 +0200 Subject: chore(db): Apply query prepared statements Fix: psalm fix: bad file fix: bug chore: add batch chore: add batch chore: add batch fix: psalm --- .../federatedfilesharing/lib/OCM/CloudFederationProviderFiles.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'apps/federatedfilesharing/lib/OCM/CloudFederationProviderFiles.php') diff --git a/apps/federatedfilesharing/lib/OCM/CloudFederationProviderFiles.php b/apps/federatedfilesharing/lib/OCM/CloudFederationProviderFiles.php index 64e8b0e4fa5..f78112e2ce6 100644 --- a/apps/federatedfilesharing/lib/OCM/CloudFederationProviderFiles.php +++ b/apps/federatedfilesharing/lib/OCM/CloudFederationProviderFiles.php @@ -450,7 +450,7 @@ class CloudFederationProviderFiles implements ICloudFederationProvider { ) ); - $result = $qb->execute(); + $result = $qb->executeQuery(); $share = $result->fetch(); $result->closeCursor(); @@ -470,13 +470,13 @@ class CloudFederationProviderFiles implements ICloudFederationProvider { ) ); - $qb->execute(); + $qb->executeStatement(); // delete all child in case of a group share $qb = $this->connection->getQueryBuilder(); $qb->delete('share_external') ->where($qb->expr()->eq('parent', $qb->createNamedParameter((int)$share['id']))); - $qb->execute(); + $qb->executeStatement(); $ownerDisplayName = $this->getUserDisplayName($owner->getId()); @@ -624,7 +624,7 @@ class CloudFederationProviderFiles implements ICloudFederationProvider { $query->update('share') ->where($query->expr()->eq('id', $query->createNamedParameter($share->getId()))) ->set('permissions', $query->createNamedParameter($permissions)) - ->execute(); + ->executeStatement(); } -- cgit v1.2.3