]> source.dussan.org Git - nextcloud-server.git/commitdiff
fix: no search when LazyFolder was provided
authorArthur Schiwon <blizzz@arthur-schiwon.de>
Fri, 12 May 2023 10:10:38 +0000 (12:10 +0200)
committerArthur Schiwon <blizzz@arthur-schiwon.de>
Wed, 21 Jun 2023 16:19:09 +0000 (18:19 +0200)
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
apps/dav/lib/Connector/Sabre/FilesReportPlugin.php

index 4cccdc842b995645c7bee966581ee3f82482d429..2cae9d948b5b778599cd3353a33087bd78932e7d 100644 (file)
@@ -27,6 +27,7 @@
  */
 namespace OCA\DAV\Connector\Sabre;
 
+use OC\Files\Node\LazyFolder;
 use OC\Files\View;
 use OCP\App\IAppManager;
 use OCP\Files\Folder;
@@ -332,7 +333,11 @@ class FilesReportPlugin extends ServerPlugin {
 
                // type check to ensure searchBySystemTag is available, it is not
                // exposed in API yet
-               if (!empty($systemTagIds) && $this->userFolder instanceof \OC\Files\Node\Folder) {
+               if (
+                       !empty($systemTagIds)
+                       && ($this->userFolder instanceof \OC\Files\Node\Folder
+                               || $this->userFolder instanceof LazyFolder)
+               ) {
                        $tags = $this->tagManager->getTagsByIds($systemTagIds);
                        $tagName = (current($tags))->getName();
                        $nodes = $this->userFolder->searchBySystemTag($tagName, $this->userSession->getUser()->getUID(), $limit ?? 0, $offset ?? 0);