diff options
author | Robin Appelman <robin@icewind.nl> | 2021-05-05 18:09:53 +0200 |
---|---|---|
committer | Robin Appelman <robin@icewind.nl> | 2021-06-14 16:11:25 +0200 |
commit | 9774fb1573d30e79eb57f8956f64b13b52b7dee9 (patch) | |
tree | f7431f41db9d421773ff23381c943c82e0471e51 /lib/private/Lockdown | |
parent | e198dc1b200f3ade93498e0ea7b468c87d46748a (diff) | |
download | nextcloud-server-9774fb1573d30e79eb57f8956f64b13b52b7dee9.tar.gz nextcloud-server-9774fb1573d30e79eb57f8956f64b13b52b7dee9.zip |
use searchoperation for storage filter instead of db expression
Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'lib/private/Lockdown')
-rw-r--r-- | lib/private/Lockdown/Filesystem/NullCache.php | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/private/Lockdown/Filesystem/NullCache.php b/lib/private/Lockdown/Filesystem/NullCache.php index afa17d7a6d7..4fde9668ded 100644 --- a/lib/private/Lockdown/Filesystem/NullCache.php +++ b/lib/private/Lockdown/Filesystem/NullCache.php @@ -23,11 +23,13 @@ namespace OC\Lockdown\Filesystem; use OC\Files\Cache\CacheEntry; +use OC\Files\Search\SearchComparison; use OCP\Constants; -use OCP\DB\QueryBuilder\IQueryBuilder; use OCP\Files\Cache\ICache; use OCP\Files\Cache\ICacheEntry; use OCP\Files\FileInfo; +use OCP\Files\Search\ISearchComparison; +use OCP\Files\Search\ISearchOperator; use OCP\Files\Search\ISearchQuery; class NullCache implements ICache { @@ -128,8 +130,8 @@ class NullCache implements ICache { throw new \OC\ForbiddenException('This request is not allowed to access the filesystem'); } - public function getQueryFilterForStorage(IQueryBuilder $builder) { - return 'false'; + public function getQueryFilterForStorage(): ISearchOperator { + return new SearchComparison(ISearchComparison::COMPARE_EQUAL, 'storage', -1); } public function getCacheEntryFromSearchResult(ICacheEntry $rawEntry): ?ICacheEntry { |