summaryrefslogtreecommitdiffstats
path: root/lib/private
diff options
context:
space:
mode:
authorVincent Petry <vincent@nextcloud.com>2021-03-11 10:27:30 +0100
committerGitHub <noreply@github.com>2021-03-11 10:27:30 +0100
commitb78dc6a6bf071199a2ecbfe6f34135c5febb112a (patch)
tree5ec5d7c7d66673dad1c5eb65951aa15ce7ac62f5 /lib/private
parent6db7731742f1e5f490deb874a0b04e86b3be8642 (diff)
parentf98fed3f8a11bb71d4c10443b20a59c3864a3617 (diff)
downloadnextcloud-server-b78dc6a6bf071199a2ecbfe6f34135c5febb112a.tar.gz
nextcloud-server-b78dc6a6bf071199a2ecbfe6f34135c5febb112a.zip
Merge pull request #26050 from nextcloud/view-search-reuse-usermanager
reuse usermanager instance when processing search results
Diffstat (limited to 'lib/private')
-rw-r--r--lib/private/Files/View.php5
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);
}
}