diff options
author | Vincent Petry <vincent@nextcloud.com> | 2022-08-23 14:15:24 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-23 14:15:24 +0200 |
commit | 5f90a6a5e2da08e7098cc44937c1713375823e74 (patch) | |
tree | ce109edb86529bc41ad7e19124b03e97643f4009 /apps/files_sharing/lib | |
parent | 1a2c008011a185fdccfefa37c1b56a5010a07320 (diff) | |
parent | b6f8b8da60c1349204d6aecf5c9781bb6193ef68 (diff) | |
download | nextcloud-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.php | 6 |
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()), ] ); |