summaryrefslogtreecommitdiffstats
path: root/lib/private/Share20
diff options
context:
space:
mode:
authorRoeland Jago Douma <roeland@famdouma.nl>2018-01-09 19:51:50 +0100
committerRoeland Jago Douma <roeland@famdouma.nl>2018-01-09 19:51:50 +0100
commit4596423b14015ad6d102195f6b0445f89dd82aa2 (patch)
tree32a82b3fc08b586930bc8baecd23c448612b7b57 /lib/private/Share20
parent167f4624cee49fa085f0d503b59a2c60a2d16a07 (diff)
downloadnextcloud-server-4596423b14015ad6d102195f6b0445f89dd82aa2.tar.gz
nextcloud-server-4596423b14015ad6d102195f6b0445f89dd82aa2.zip
Do not instantiate node when not needed
Use the lazy functions is possible. This avoids getting the node if not required. Possible fix for #7751 Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'lib/private/Share20')
-rw-r--r--lib/private/Share20/DefaultShareProvider.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/private/Share20/DefaultShareProvider.php b/lib/private/Share20/DefaultShareProvider.php
index 844b36b2994..b9ab7a46873 100644
--- a/lib/private/Share20/DefaultShareProvider.php
+++ b/lib/private/Share20/DefaultShareProvider.php
@@ -452,9 +452,9 @@ class DefaultShareProvider implements IShareProvider {
'uid_owner' => $qb->createNamedParameter($share->getShareOwner()),
'uid_initiator' => $qb->createNamedParameter($share->getSharedBy()),
'parent' => $qb->createNamedParameter($share->getId()),
- 'item_type' => $qb->createNamedParameter($share->getNode() instanceof File ? 'file' : 'folder'),
- 'item_source' => $qb->createNamedParameter($share->getNode()->getId()),
- 'file_source' => $qb->createNamedParameter($share->getNode()->getId()),
+ 'item_type' => $qb->createNamedParameter($share->getNodeType()),
+ 'item_source' => $qb->createNamedParameter($share->getNodeId()),
+ 'file_source' => $qb->createNamedParameter($share->getNodeId()),
'file_target' => $qb->createNamedParameter($share->getTarget()),
'permissions' => $qb->createNamedParameter($share->getPermissions()),
'stime' => $qb->createNamedParameter($share->getShareTime()->getTimestamp()),