summaryrefslogtreecommitdiffstats
path: root/apps/files_sharing/lib
diff options
context:
space:
mode:
authorblizzz <blizzz@arthur-schiwon.de>2022-08-30 17:48:11 +0200
committerGitHub <noreply@github.com>2022-08-30 17:48:11 +0200
commit7e980a1f1f4b0a58731181d8b80aa92f53deebdd (patch)
treee610c9a0bdc15500e02c7befb511f94b558c6ce1 /apps/files_sharing/lib
parent2d25bdac2a8a097855394ac2c6007c5105798b3b (diff)
parent9cadbe811eb6931ea29dd43745d10cdbe2f99b1f (diff)
downloadnextcloud-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.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 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()),
]
);