diff options
author | Côme Chilliet <come.chilliet@nextcloud.com> | 2023-02-21 12:13:02 +0100 |
---|---|---|
committer | Côme Chilliet (Rebase PR Action) <come-nc@users.noreply.github.com> | 2023-02-21 13:37:30 +0000 |
commit | 74811813e7218f5c24d199086f5b56f8c476ef45 (patch) | |
tree | 5c24443a0494cafb8869dc20ce2bbaeff0c17344 /apps/files_sharing | |
parent | 5fcb55a2a9653575eec1c9d3551d6a887a22b84f (diff) | |
download | nextcloud-server-74811813e7218f5c24d199086f5b56f8c476ef45.tar.gz nextcloud-server-74811813e7218f5c24d199086f5b56f8c476ef45.zip |
Avoid extra parenthesis around SQL in IN expressions
The expression builder already suround the SQL with parenthesis when
using in(), so we must not add another pair, this confuses at least
sqlite.
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Diffstat (limited to 'apps/files_sharing')
-rw-r--r-- | apps/files_sharing/lib/External/Manager.php | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/apps/files_sharing/lib/External/Manager.php b/apps/files_sharing/lib/External/Manager.php index 68bc6801e46..d2e113c8bb3 100644 --- a/apps/files_sharing/lib/External/Manager.php +++ b/apps/files_sharing/lib/External/Manager.php @@ -660,7 +660,7 @@ class Manager { $query->delete('federated_reshares') - ->where($query->expr()->in('share_id', $query->createFunction('(' . $select . ')'))); + ->where($query->expr()->in('share_id', $query->createFunction($select))); $query->execute(); $deleteReShares = $this->connection->getQueryBuilder(); @@ -730,10 +730,10 @@ class Manager { // delete group share entry and matching sub-entries $qb->delete('share_external') ->where( - $qb->expr()->orX( - $qb->expr()->eq('id', $qb->createParameter('share_id')), - $qb->expr()->eq('parent', $qb->createParameter('share_parent_id')) - ) + $qb->expr()->orX( + $qb->expr()->eq('id', $qb->createParameter('share_id')), + $qb->expr()->eq('parent', $qb->createParameter('share_parent_id')) + ) ); foreach ($shares as $share) { |