]> source.dussan.org Git - nextcloud-server.git/commitdiff
Merge pull request #37969 from nextcloud/poc/noid/systemtags-perf-tag-endpoint
authorJulius Härtl <jus@bitgrid.net>
Wed, 28 Jun 2023 05:53:35 +0000 (07:53 +0200)
committerGitHub <noreply@github.com>
Wed, 28 Jun 2023 05:53:35 +0000 (07:53 +0200)
1  2 
lib/private/Files/Cache/QuerySearchHelper.php
lib/private/Files/Node/Folder.php
lib/private/Files/Node/LazyFolder.php

index 75e203d5fd9598b6f8414a3beb40b4ff299766f4,964526203b657baa1d59d56f924791c28a8c03eb..15c089a0f11478a29c7e2b2589118cede0d1d516
@@@ -194,10 -208,18 +207,18 @@@ class QuerySearchHelper 
                return $results;
        }
  
+       protected function requireUser(ISearchQuery $searchQuery): IUser {
+               $user = $searchQuery->getUser();
+               if ($user === null) {
+                       throw new \InvalidArgumentException("This search operation requires the user to be set in the query");
+               }
+               return $user;
+       }
        /**
 -       * @return array{array<string, ICache>, array<string, IMountPoint>}
 +       * @return list{0?: array<array-key, ICache>, 1?: array<array-key, IMountPoint>}
         */
 -      public function getCachesAndMountPointsForSearch(Root $root, string $path, bool $limitToHome = false): array {
 +      public function getCachesAndMountPointsForSearch(IRootFolder $root, string $path, bool $limitToHome = false): array {
                $rootLength = strlen($path);
                $mount = $root->getMount($path);
                $storage = $mount->getStorage();
Simple merge
Simple merge