diff options
author | Robin Appelman <robin@icewind.nl> | 2024-03-07 11:59:53 +0100 |
---|---|---|
committer | Robin Appelman <robin@icewind.nl> | 2024-05-01 16:46:06 +0200 |
commit | ccd56672e80665a78bb89f9606367ba7797e4b45 (patch) | |
tree | bf7aebf617166ec5bff686e056a4b860a4559923 /apps/federatedfilesharing | |
parent | d82fb01b0a103777e7d999ecc48b8d63cfb7e802 (diff) | |
download | nextcloud-server-ccd56672e80665a78bb89f9606367ba7797e4b45.tar.gz nextcloud-server-ccd56672e80665a78bb89f9606367ba7797e4b45.zip |
refactor: remove non-shallow getSharesInFolder
Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'apps/federatedfilesharing')
-rw-r--r-- | apps/federatedfilesharing/lib/FederatedShareProvider.php | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/apps/federatedfilesharing/lib/FederatedShareProvider.php b/apps/federatedfilesharing/lib/FederatedShareProvider.php index 340de3a1761..3f6cc582fde 100644 --- a/apps/federatedfilesharing/lib/FederatedShareProvider.php +++ b/apps/federatedfilesharing/lib/FederatedShareProvider.php @@ -578,6 +578,10 @@ class FederatedShareProvider implements IShareProvider { public function getSharesInFolder($userId, Folder $node, $reshares, $shallow = true) { + if (!$shallow) { + throw new \Exception("non-shallow getSharesInFolder is no longer supported"); + } + $qb = $this->dbConnection->getQueryBuilder(); $qb->select('*') ->from('share', 's') @@ -605,12 +609,7 @@ class FederatedShareProvider implements IShareProvider { $qb->innerJoin('s', 'filecache', 'f', $qb->expr()->eq('s.file_source', 'f.fileid')); - $qb->andWhere($qb->expr()->eq('f.storage', $qb->createNamedParameter($node->getMountPoint()->getNumericStorageId(), IQueryBuilder::PARAM_INT))); - if ($shallow) { - $qb->andWhere($qb->expr()->eq('f.parent', $qb->createNamedParameter($node->getId(), IQueryBuilder::PARAM_INT))); - } else { - $qb->andWhere($qb->expr()->like('f.path', $qb->createNamedParameter($this->dbConnection->escapeLikeParameter($node->getInternalPath()) . '/%'))); - } + $qb->andWhere($qb->expr()->eq('f.parent', $qb->createNamedParameter($node->getId()))); $qb->orderBy('id'); |