diff options
author | blizzz <blizzz@arthur-schiwon.de> | 2022-08-30 17:48:11 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-30 17:48:11 +0200 |
commit | 7e980a1f1f4b0a58731181d8b80aa92f53deebdd (patch) | |
tree | e610c9a0bdc15500e02c7befb511f94b558c6ce1 /apps/files_sharing/lib | |
parent | 2d25bdac2a8a097855394ac2c6007c5105798b3b (diff) | |
parent | 9cadbe811eb6931ea29dd43745d10cdbe2f99b1f (diff) | |
download | nextcloud-server-7e980a1f1f4b0a58731181d8b80aa92f53deebdd.tar.gz nextcloud-server-7e980a1f1f4b0a58731181d8b80aa92f53deebdd.zip |
Merge pull request #33656 from nextcloud/backport/33574/stable24
[stable24] 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 672777251bf..ce87eb730f3 100644 --- a/apps/files_sharing/lib/Cache.php +++ b/apps/files_sharing/lib/Cache.php @@ -182,16 +182,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()), ] ); |