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>
This commit is contained in:
Roeland Jago Douma 2018-01-09 19:51:50 +01:00
parent 167f4624ce
commit 4596423b14
No known key found for this signature in database
GPG Key ID: F941078878347C0C
1 changed files with 3 additions and 3 deletions

View File

@ -452,9 +452,9 @@ class DefaultShareProvider implements IShareProvider {
'uid_owner' => $qb->createNamedParameter($share->getShareOwner()), 'uid_owner' => $qb->createNamedParameter($share->getShareOwner()),
'uid_initiator' => $qb->createNamedParameter($share->getSharedBy()), 'uid_initiator' => $qb->createNamedParameter($share->getSharedBy()),
'parent' => $qb->createNamedParameter($share->getId()), 'parent' => $qb->createNamedParameter($share->getId()),
'item_type' => $qb->createNamedParameter($share->getNode() instanceof File ? 'file' : 'folder'), 'item_type' => $qb->createNamedParameter($share->getNodeType()),
'item_source' => $qb->createNamedParameter($share->getNode()->getId()), 'item_source' => $qb->createNamedParameter($share->getNodeId()),
'file_source' => $qb->createNamedParameter($share->getNode()->getId()), 'file_source' => $qb->createNamedParameter($share->getNodeId()),
'file_target' => $qb->createNamedParameter($share->getTarget()), 'file_target' => $qb->createNamedParameter($share->getTarget()),
'permissions' => $qb->createNamedParameter($share->getPermissions()), 'permissions' => $qb->createNamedParameter($share->getPermissions()),
'stime' => $qb->createNamedParameter($share->getShareTime()->getTimestamp()), 'stime' => $qb->createNamedParameter($share->getShareTime()->getTimestamp()),