From e7a7b4a40184dc3da2c83e858c820625f660e48e Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Fri, 9 Feb 2024 09:54:52 +0100 Subject: perf: switch places that always use the first getById result to getFirstNodeById Signed-off-by: Robin Appelman --- apps/files_sharing/lib/Controller/ShareController.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'apps/files_sharing/lib/Controller/ShareController.php') 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()); -- cgit v1.2.3