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 /lib/private | |
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 'lib/private')
-rw-r--r-- | lib/private/Files/Cache/Wrapper/CacheJail.php | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/private/Files/Cache/Wrapper/CacheJail.php b/lib/private/Files/Cache/Wrapper/CacheJail.php index 2c8a5b4dbf0..5476cc625c3 100644 --- a/lib/private/Files/Cache/Wrapper/CacheJail.php +++ b/lib/private/Files/Cache/Wrapper/CacheJail.php @@ -306,10 +306,14 @@ class CacheJail extends CacheWrapper { } public function getQueryFilterForStorage(): ISearchOperator { + return $this->addJailFilterQuery($this->getCache()->getQueryFilterForStorage()); + } + + protected function addJailFilterQuery(ISearchOperator $filter): ISearchOperator { if ($this->getGetUnjailedRoot() !== '' && $this->getGetUnjailedRoot() !== '/') { return new SearchBinaryOperator(ISearchBinaryOperator::OPERATOR_AND, [ - $this->getCache()->getQueryFilterForStorage(), + $filter, new SearchBinaryOperator(ISearchBinaryOperator::OPERATOR_OR, [ new SearchComparison(ISearchComparison::COMPARE_EQUAL, 'path', $this->getGetUnjailedRoot()), @@ -319,7 +323,7 @@ class CacheJail extends CacheWrapper { ] ); } else { - return $this->getCache()->getQueryFilterForStorage(); + return $filter; } } |