diff options
author | Robin Appelman <robin@icewind.nl> | 2022-08-17 11:58:57 +0200 |
---|---|---|
committer | Robin Appelman <robin@icewind.nl> | 2022-08-17 11:58:57 +0200 |
commit | b6f8b8da60c1349204d6aecf5c9781bb6193ef68 (patch) | |
tree | 251b1273b780367a54318309f73afe8ba981b667 /apps/files_sharing | |
parent | 312b719acf686f51065e83290cd88704d703a50c (diff) | |
download | nextcloud-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.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 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()), ] ); |