diff options
author | Robin Appelman <robin@icewind.nl> | 2021-03-10 19:35:13 +0100 |
---|---|---|
committer | Robin Appelman <robin@icewind.nl> | 2021-03-10 19:35:13 +0100 |
commit | f98fed3f8a11bb71d4c10443b20a59c3864a3617 (patch) | |
tree | d54bda7ad9f48f552928879c462b76456849f09a /lib/private | |
parent | 62929cc646134fbd409cfb4eacb7039d15763b96 (diff) | |
download | nextcloud-server-f98fed3f8a11bb71d4c10443b20a59c3864a3617.tar.gz nextcloud-server-f98fed3f8a11bb71d4c10443b20a59c3864a3617.zip |
reuse usermanager instance when processing search results
saves some time when processing large search results
Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'lib/private')
-rw-r--r-- | lib/private/Files/View.php | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/private/Files/View.php b/lib/private/Files/View.php index ed7d6c26318..2223858b7a9 100644 --- a/lib/private/Files/View.php +++ b/lib/private/Files/View.php @@ -1643,6 +1643,7 @@ class View { $mount = $this->getMount(''); $mountPoint = $mount->getMountPoint(); $storage = $mount->getStorage(); + $userManager = \OC::$server->getUserManager(); if ($storage) { $cache = $storage->getCache(''); @@ -1652,7 +1653,7 @@ class View { $internalPath = $result['path']; $path = $mountPoint . $result['path']; $result['path'] = substr($mountPoint . $result['path'], $rootLength); - $owner = \OC::$server->getUserManager()->get($storage->getOwner($internalPath)); + $owner = $userManager->get($storage->getOwner($internalPath)); $files[] = new FileInfo($path, $storage, $internalPath, $result, $mount, $owner); } } @@ -1671,7 +1672,7 @@ class View { $internalPath = $result['path']; $result['path'] = rtrim($relativeMountPoint . $result['path'], '/'); $path = rtrim($mountPoint . $internalPath, '/'); - $owner = \OC::$server->getUserManager()->get($storage->getOwner($internalPath)); + $owner = $userManager->get($storage->getOwner($internalPath)); $files[] = new FileInfo($path, $storage, $internalPath, $result, $mount, $owner); } } |