From ae07f4f53d75a74469b310cb4db47b5636cc9b39 Mon Sep 17 00:00:00 2001 From: Alexandre Roux Date: Thu, 24 Oct 2024 13:00:30 +0000 Subject: [PATCH 1/4] disable search --- lib/Filesystem/CacheWrapper.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/lib/Filesystem/CacheWrapper.php b/lib/Filesystem/CacheWrapper.php index 8233a60e..8c502b86 100644 --- a/lib/Filesystem/CacheWrapper.php +++ b/lib/Filesystem/CacheWrapper.php @@ -8,6 +8,9 @@ use OC\Files\Cache\Wrapper\CacheWrapper as Wrapper; use OCP\Constants; use OCP\Files\Cache\ICache; use OCP\Files\ForbiddenException; +use OCP\Files\Cache\ICacheEntry; +use OCP\Files\Search\ISearchQuery; + class CacheWrapper extends Wrapper { @@ -44,4 +47,12 @@ class CacheWrapper extends Wrapper { public function remove($fileId) { throw new \Exception('User data cache removal is disabled.'); } + + public function searchQuery(ISearchQuery $searchQuery) { + return null; + } + + public function getCacheEntryFromSearchResult(ICacheEntry $rawEntry): ?ICacheEntry { + return null; + } } -- GitLab From 563284d8e3ba2f389b508512728121a403014363 Mon Sep 17 00:00:00 2001 From: Alexandre Roux Date: Thu, 24 Oct 2024 14:12:57 +0000 Subject: [PATCH 2/4] return an empty array --- lib/Filesystem/CacheWrapper.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/Filesystem/CacheWrapper.php b/lib/Filesystem/CacheWrapper.php index 8c502b86..a59dc206 100644 --- a/lib/Filesystem/CacheWrapper.php +++ b/lib/Filesystem/CacheWrapper.php @@ -49,9 +49,9 @@ class CacheWrapper extends Wrapper { } public function searchQuery(ISearchQuery $searchQuery) { - return null; + return []; } - + public function getCacheEntryFromSearchResult(ICacheEntry $rawEntry): ?ICacheEntry { return null; } -- GitLab From b12037c006104174e25fc37ee8dc085a4550d313 Mon Sep 17 00:00:00 2001 From: Alexandre Roux Date: Thu, 24 Oct 2024 19:38:41 +0000 Subject: [PATCH 3/4] Update file CacheWrapper.php --- lib/Filesystem/CacheWrapper.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Filesystem/CacheWrapper.php b/lib/Filesystem/CacheWrapper.php index a59dc206..7f0486c9 100644 --- a/lib/Filesystem/CacheWrapper.php +++ b/lib/Filesystem/CacheWrapper.php @@ -7,8 +7,8 @@ namespace OCA\EcloudAccounts\Filesystem; use OC\Files\Cache\Wrapper\CacheWrapper as Wrapper; use OCP\Constants; use OCP\Files\Cache\ICache; -use OCP\Files\ForbiddenException; use OCP\Files\Cache\ICacheEntry; +use OCP\Files\ForbiddenException; use OCP\Files\Search\ISearchQuery; -- GitLab From 5b607228151ac3a8825fa530fcd47c1e263709b7 Mon Sep 17 00:00:00 2001 From: Alexandre R D'Anzi Date: Thu, 24 Oct 2024 21:54:11 +0200 Subject: [PATCH 4/4] fix cache lint --- lib/Filesystem/CacheWrapper.php | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/Filesystem/CacheWrapper.php b/lib/Filesystem/CacheWrapper.php index 7f0486c9..da6e3253 100644 --- a/lib/Filesystem/CacheWrapper.php +++ b/lib/Filesystem/CacheWrapper.php @@ -11,7 +11,6 @@ use OCP\Files\Cache\ICacheEntry; use OCP\Files\ForbiddenException; use OCP\Files\Search\ISearchQuery; - class CacheWrapper extends Wrapper { public function __construct( -- GitLab