summaryrefslogtreecommitdiffstats
path: root/apps/files_sharing
diff options
context:
space:
mode:
authorRobin Appelman <robin@icewind.nl>2022-08-17 11:58:57 +0200
committerRobin Appelman <robin@icewind.nl>2022-08-17 11:58:57 +0200
commitb6f8b8da60c1349204d6aecf5c9781bb6193ef68 (patch)
tree251b1273b780367a54318309f73afe8ba981b667 /apps/files_sharing
parent312b719acf686f51065e83290cd88704d703a50c (diff)
downloadnextcloud-server-b6f8b8da60c1349204d6aecf5c9781bb6193ef68.tar.gz
nextcloud-server-b6f8b8da60c1349204d6aecf5c9781bb6193ef68.zip
directly build the search filter for shared storage instead of setting up the source cache
Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'apps/files_sharing')
-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 707b64b79d7..7433c15ad85 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()),
]
);