]> source.dussan.org Git - nextcloud-server.git/commitdiff
chore: cleanup unused code
authorArthur Schiwon <blizzz@arthur-schiwon.de>
Thu, 11 May 2023 11:18:45 +0000 (13:18 +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 8330934fa75852f0247cdabacf5bb78bc317c684..4cccdc842b995645c7bee966581ee3f82482d429 100644 (file)
@@ -341,49 +341,6 @@ class FilesReportPlugin extends ServerPlugin {
                return $nodes;
        }
 
-       private function getSystemTagFileIds($systemTagIds) {
-               $resultFileIds = null;
-
-               // check user permissions, if applicable
-               if (!$this->isAdmin()) {
-                       // check visibility/permission
-                       $tags = $this->tagManager->getTagsByIds($systemTagIds);
-                       $unknownTagIds = [];
-                       foreach ($tags as $tag) {
-                               if (!$tag->isUserVisible()) {
-                                       $unknownTagIds[] = $tag->getId();
-                               }
-                       }
-
-                       if (!empty($unknownTagIds)) {
-                               throw new TagNotFoundException('Tag with ids ' . implode(', ', $unknownTagIds) . ' not found');
-                       }
-               }
-
-               // fetch all file ids and intersect them
-               foreach ($systemTagIds as $systemTagId) {
-                       $fileIds = $this->tagMapper->getObjectIdsForTags($systemTagId, 'files');
-
-                       if (empty($fileIds)) {
-                               // This tag has no files, nothing can ever show up
-                               return [];
-                       }
-
-                       // first run ?
-                       if ($resultFileIds === null) {
-                               $resultFileIds = $fileIds;
-                       } else {
-                               $resultFileIds = array_intersect($resultFileIds, $fileIds);
-                       }
-
-                       if (empty($resultFileIds)) {
-                               // Empty intersection, nothing can show up anymore
-                               return [];
-                       }
-               }
-               return $resultFileIds;
-       }
-
        /**
         * @suppress PhanUndeclaredClassMethod
         * @param array $circlesIds