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:
parent
167f4624ce
commit
4596423b14
|
@ -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()),
|
||||||
|
|
Loading…
Reference in New Issue