summaryrefslogtreecommitdiffstats
path: root/apps/files_sharing/lib
diff options
context:
space:
mode:
authorVincent Petry <vincent@nextcloud.com>2022-08-23 14:15:24 +0200
committerGitHub <noreply@github.com>2022-08-23 14:15:24 +0200
commit5f90a6a5e2da08e7098cc44937c1713375823e74 (patch)
treece109edb86529bc41ad7e19124b03e97643f4009 /apps/files_sharing/lib
parent1a2c008011a185fdccfefa37c1b56a5010a07320 (diff)
parentb6f8b8da60c1349204d6aecf5c9781bb6193ef68 (diff)
downloadnextcloud-server-5f90a6a5e2da08e7098cc44937c1713375823e74.tar.gz
nextcloud-server-5f90a6a5e2da08e7098cc44937c1713375823e74.zip
Merge pull request #33574 from nextcloud/search-share-query-filter-no-init
directly build the search filter for shared storage instead of setting up the source cache
Diffstat (limited to 'apps/files_sharing/lib')
-rw-r--r--apps/files_sharing/lib/Cache.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/apps/files_sharing/lib/Cache.php b/apps/files_sharing/lib/Cache.php
index 80f9f64d1aa..0025bb98fbb 100644
--- a/apps/files_sharing/lib/Cache.php
+++ b/apps/files_sharing/lib/Cache.php
@@ -183,16 +183,18 @@ class Cache extends CacheJail {
}
public function getQueryFilterForStorage(): ISearchOperator {
+ $storageFilter = \OC\Files\Cache\Cache::getQueryFilterForStorage();
+
// Do the normal jail behavior for non files
if ($this->storage->getItemType() !== 'file') {
- return parent::getQueryFilterForStorage();
+ return $this->addJailFilterQuery($storageFilter);
}
// for single file shares we don't need to do the LIKE
return new SearchBinaryOperator(
ISearchBinaryOperator::OPERATOR_AND,
[
- \OC\Files\Cache\Cache::getQueryFilterForStorage(),
+ $storageFilter,
new SearchComparison(ISearchComparison::COMPARE_EQUAL, 'path', $this->getGetUnjailedRoot()),
]
);