aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files_sharing/lib/Controller/ShareController.php
diff options
context:
space:
mode:
authorRobin Appelman <robin@icewind.nl>2024-02-09 09:54:52 +0100
committerRobin Appelman <robin@icewind.nl>2024-03-04 13:57:31 +0100
commite7a7b4a40184dc3da2c83e858c820625f660e48e (patch)
tree367bda0ac814376e7c771fbe4b1c40cf7f33df53 /apps/files_sharing/lib/Controller/ShareController.php
parent4d110c1dd6ae384c00c93b4e266118004b71e498 (diff)
downloadnextcloud-server-e7a7b4a40184dc3da2c83e858c820625f660e48e.tar.gz
nextcloud-server-e7a7b4a40184dc3da2c83e858c820625f660e48e.zip
perf: switch places that always use the first getById result to getFirstNodeById
Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'apps/files_sharing/lib/Controller/ShareController.php')
-rw-r--r--apps/files_sharing/lib/Controller/ShareController.php3
1 files changed, 1 insertions, 2 deletions
diff --git a/apps/files_sharing/lib/Controller/ShareController.php b/apps/files_sharing/lib/Controller/ShareController.php
index 0691137631b..d6780d37f2f 100644
--- a/apps/files_sharing/lib/Controller/ShareController.php
+++ b/apps/files_sharing/lib/Controller/ShareController.php
@@ -527,8 +527,7 @@ class ShareController extends AuthPublicShareController {
$fileId = $node->getId();
$userFolder = $this->rootFolder->getUserFolder($share->getSharedBy());
- $userNodeList = $userFolder->getById($fileId);
- $userNode = $userNodeList[0];
+ $userNode = $userFolder->getFirstNodeById($fileId);
$ownerFolder = $this->rootFolder->getUserFolder($share->getShareOwner());
$userPath = $userFolder->getRelativePath($userNode->getPath());
$ownerPath = $ownerFolder->getRelativePath($node->getPath());