aboutsummaryrefslogtreecommitdiffstats
path: root/apps/federatedfilesharing
diff options
context:
space:
mode:
authorRobin Appelman <robin@icewind.nl>2024-05-17 17:41:25 +0200
committerGitHub <noreply@github.com>2024-05-17 17:41:25 +0200
commit54afea4b01385106a241a5161b3894e669716107 (patch)
tree871d0cf522eaeff4e9bbc84924f382c5a8303f4c /apps/federatedfilesharing
parent495d3979367eb259aa0ff1ad8ee1c6f487995c31 (diff)
parentccd56672e80665a78bb89f9606367ba7797e4b45 (diff)
downloadnextcloud-server-54afea4b01385106a241a5161b3894e669716107.tar.gz
nextcloud-server-54afea4b01385106a241a5161b3894e669716107.zip
Merge pull request #44460 from nextcloud/remove-non-shallow-in-folder
refactor: remove non-shallow getSharesInFolder
Diffstat (limited to 'apps/federatedfilesharing')
-rw-r--r--apps/federatedfilesharing/lib/FederatedShareProvider.php11
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');